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

Add 'up' metric #13

Open
matejzero opened this issue Jan 4, 2018 · 4 comments
Open

Add 'up' metric #13

matejzero opened this issue Jan 4, 2018 · 4 comments

Comments

@matejzero
Copy link

Hello,

I'm testing your exporter with our logstash instances and I'm missing an 'up' metrics which would tell me if logstash is running or not, so I can alert if it crashes.

Alxrem is exposing this metric in his exporter. Would you be willing to add it as well? It seems to me like a useful metric to have.

Thanks

@matejzero
Copy link
Author

matejzero commented Jan 4, 2018

I looked at the exposed metrics and could solve this problem with logstash_exporter_scrape_duration_seconds_count metric:

rate(logstash_exporter_scrape_duration_seconds_count{result="error"}[1m]) == 1

This works for me and is better then up since it's more descriptive of what it does.

@matejzero
Copy link
Author

matejzero commented Jan 16, 2018

After some use, I still think up metric would be useful, something like logstash_exporter_up or logstash_node_up. Values would be 1, if last scrape was successful and 0 if not.

This is also recommended by prometheus.

@mpucholblasco
Copy link

Metric added on https://github.com/sequra/logstash_exporter/pull/5

@matejzero
Copy link
Author

This is nice to hear!

I also see you merged some extra PRs to your repo. When I get back to work I'll pull your code and test it. I saw some new metrics regarding queue which should help me with a problem I'm having.

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