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
Nice metrics for postfix_exporter #6
Comments
Adding some metrics I'd love to see (would even sponsor dev).
Where code is 450,530,550 and so on and where extended code would be "4.5.1", "5.7.0" etc. The ultimate must have for me would be the reason variable.
|
Thanks @deajan. For any new metric it's crucial to have anonymized logs as I only host a single mail server for myself and even though I use to dig through the Postfix source code to understand how log entries are being composed, it would greatly increase a chance to add any metric I'm not sure about/not reproducible. |
Hi @sergeymakinen ;) Hope this helps ;) |
Hey @deajan, Great, thank you! :) I'll dig into the logs and hopefully get what I need. 🤞 |
Hello Sergey, Sorry for being late for the party ;) I've used
Using |
Hi @deajan, Did a quick test using a test data with your config and it seems to work for me. Probably one thing to take care about: Go regexes are case sensitive by default, so you might want test your expected log lines on https://regex101.com (or similar) against regexes and share with me if they match but it still doesn't work for you. |
You're right, exporter works as advertised. Just didn't let it run enough time, and on 26th there isn't a big mail flow, so that's what got me. |
Well, it seems that I still got a problem nevertheless. I've checked my regexes via regex101 (with go flavor), and I get no results.
Here's a full copy of my
Also, I've tried to understand the documentation, but I don't understand, what is |
Hmm.. Finally got some 550 error message in
I just wonder why |
Per the configuration the exporter is only able to capture host replies on erroneous queue statuses (hence I think the following changes are necessary to make it more configurable (while keeping sane):
Hopefully these changes should help, I think that's how the configuration file would look like: status_replies:
- regexp: (?i)out of storage|recipient address|temporary (local )?problem|internal resource|mailbox (is )?unavailable
text: remote_problem
- regexp: (?i)recipient address
text: remote_user_not_existing
- regexp: (?i)connection time(d)? out|timeout|unreachable
text: remote_not_reachable
- regexp: (?i)spf|dkim|dns
text: local_conf_problem
- regexp: (?i)reputation|blacklist
text: bad_reputation
- regexp: 2\.0\.0
match: enhanced_code # or `code` or `text` which is default
text: sent
- regexp: 2\.6\.0
match: enhanced_code
text: sent_in_spam_folder
- regexp: (?i)gr(a|e)ylist
text: greylisting
- regexp: (.+)
text: $1
noqueue_reject_replies:
- regexp: (?i)Client host rejected|cannot find your hostname|Rejected by SPF
text: spam
- regexp: (?i)Recipient address rejected|Recipient address not found|User unknown
text: user_not_existing
- regexp: (.+)
text: $1 |
You might want to grab v2.0.0-beta.2, take a look at changes in the CONFIGURATION.md and give it a try. :) Happy New Year! |
Thank you, will definitly do... next year ;) |
Hello @sergeymakinen
So far, I'm running two different postfix exporters, of which only yours seems to be maintained.
In order to diagnose postfix, I'd love to see the following metrics added to your postfix exporter:
I'd like to have some more values, but I get alot of NaN values, so I guess I need to open another issue first before asking you things that the exporter already does perhaps.
PS: I updated your grafana dashboard to use vectors, and added some metrics. I'll post them if needed.
The text was updated successfully, but these errors were encountered: