-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
user query also returns groups #34
Comments
i know exactly how you feel 🤣 . that mlist was historicaly seen a bit different but i can only concur that could be divided to somethine else. And the
it will also give you contacts which at least only show up as 'contact-NNN' (when not of your domain) and status You can differentiate when you query
i wrote this thingy once but never extended it to orgs and contacts but that might help ^_^
|
@crpb Thank you for your reply. I'm currently making a prometheus exporter for Grommunio. I'll post about it on the forum shortly. |
@deajan folderstatistics
|
Groups can be excluded from the results by using the |
@juliaschroeder Works for me, thank you. |
this reminds me of this :P
Originally posted by @crpb in 9281282 and you can just do an |
Initializing the Python environment, especially the SQLAlchemy runtime, takes a lot of time. If possible, you can pre-generate commands and pipe them into grommunio-admin shell -x <<EOF
exmdb user1@example.com store get
exmdb user2@example.com store get
EOF However, that will make the output even more difficult to work with… Another factor is that the mailbox access which occurs for every user, which can take some time if the mailbox is not already loaded and has to be opened (by the I will add the options to produce output in JSON and CSV format in the next days to at least make the parsing easier. |
ask the people who only do those shenanigangs 📦 this was just the first try.
|
@crpb @juliaschroeder Thank you. Currently, I'm parsing exmdb output via awk to produce json output via Indeed, having json output would be much easier ^^ @crpb I'm not feeling really comfortable with directly tinkering with the sqllite databases, since everything could break on internal data schema changes. I've made some tests, getting a single value via |
i just got this one
times:
EDIT:
you have seen that it's all temporary tables and |
Perhaps. But having an API that does the job is enough for me, and doesn't require getting the sqlite file paths ^^
As a sysadmin, I cannot imagine what the folderstatistics are for an a monitoring tool. What's the goal ? Mine is to know whether a mailbox reaches the quotas, and act before it's too late. |
it was a thought. i also know people who keep mailboxes very clean and the next maybe wants to know if there is anything Stuck in a process which would usually clear out a folder but didn't and that thing just doesn't warn about it or it just didn't know.. |
I get the idea... But folderstatistics would add alot of data (one entry per folder name, with every user having it's own idea of folder names I guess). |
I've just coded something around the shell, and it's pretty fast, but the output is not coherent. I don't get to parse the output via regex because sometimes I get newlines in the middle of data. I've managed to parse the output with some little awk magic. As for now, my requests take a couple of seconds regardless of the number of users, although I didn't test with "big" grommunio setups, it should scale better. |
@deajan fwiw, that might be faster :p.
|
@crpb Thanks, but I think using your solution will need to query the maildir location on a per user basis using grommunio-admin, which will make it again slow, as suggested by @juliaschroeder since it will again initialize python + sqlalchemy env per user. I guess the current implementation is already quite fast (I don't have a "big" grommunio server to test though), but using 0.9 seconds for 4 users instead of 0,8s is pretty decent already, since it would require 0,025s per user in a synthetic benchmark. I think that once I get to parse the new json output, it will be even faster since I won't rely on terrible awk hack. Still, I really appreciate your feedback, thank you. |
just fyi, if it comes to be slow somewhere you would have to do an |
@juliaschroeder LGTM, the new format |
While developping around
grommunio-admin
, I noticed thatgrommunio-admin user query
returns users, but also groups, with no way to differentiate users from groups.Pretty sure that should be a job for
grommunio-admin mlist list
, getting user list should not include mailing lists IMO.Using
The text was updated successfully, but these errors were encountered: