Skip to content
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

metrics expiry #83

Closed
zerthimon opened this issue Jul 6, 2016 · 5 comments
Closed

metrics expiry #83

zerthimon opened this issue Jul 6, 2016 · 5 comments

Comments

@zerthimon
Copy link

It'd be nice if there was a configuration parameter to specify how long the metric should "live" inside the pushgateway and then expie.

@brian-brazil
Copy link
Contributor

This has been discussed previously, we will not be adding this feature. See #19

@zerthimon
Copy link
Author

zerthimon commented Jul 7, 2016

So, I was hoping I could alert on cron-based scripts used to backup stuff off my servers to a remote storage. I made each script send it's exit status to prometheus-pushgateway. It works well - I defined alert rules for a non-zero exit status. Now, how do I alert if the scripts crash in the middle (or don't run at all) and therefore dont send their exit code ? The pushgateway reports the last status forever, so I'll never know there is a problem with the script.

@zerthimon
Copy link
Author

P.S. I read the thread #19 Is my solution for this use case an antipattern ? Why ? What's the prometheus-based best practice approach to monitoring cron script results ?

@brian-brazil
Copy link
Contributor

http://www.robustperception.io/monitoring-batch-jobs-in-python/ explains how to do this from Python.

@zerthimon
Copy link
Author

Ok, understood, additional metric for time of last success. Thanks @brian-brazil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants