Add 'up' metric
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
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.
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.
Metric added on https://github.com/sequra/logstash_exporter/pull/5
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.