ytti / oxidized

Oxidized is a network device configuration backup tool. It's a RANCID replacement!
Apache License 2.0
2.8k stars 925 forks source link

Add Prometheus /metrics endpoint to allow for easy monitoring #3024

Open frittentheke opened 10 months ago

frittentheke commented 10 months ago

I am wondering if a /metrics endpoint for Prometheus could be added to Oxidized to allow to integrate it easily into modern monitoring stacks. There are more tools implementing the scraping Prometheus / OpenMetrics format.

I even found an exporter for the Oxidized HTTP API at https://github.com/momorientes/oxidized_exporter which implements parsing the /nodes.json to then provide metrics. But I'd rather avoid another piece of software / an exporter when this could easily be done within Oxidized.

There also is a client library for Ruby available from Prometheus, see https://github.com/prometheus/client_ruby. There is also a middleware to provide an exporter endpoint https://github.com/prometheus/client_ruby#rack-middleware With all the metrics https://github.com/prometheus/client_ruby#metrics available monitoring could not only cover "success" or "errors", but also performance histograms for the collection of configs.

robertcheramy commented 9 months ago

Prometheus is an open-source systems monitoring and alerting toolkit.

frittentheke commented 3 months ago

@robertcheramy could you revive this one?

robertcheramy commented 3 weeks ago

An implementation of such an endpoint would have to be done in oxidized-web. I'm reopening the issue as of a request of @frittentheke . If no one is interested enough in this feature request to invest time/money and write some code, I will close it definitely after it becomes "stale" again (in 90 days) and I find some time reviewing stale issues for closing.