Open AGWA opened 1 year ago
A /metrics endpoint for Prometheus would be the best option imo
@chayleaf I don't have any experience with Prometheus. Could a metrics endpoint be implemented by outputting some JSON or some other simple format? How would Prometheus know how to interpret the data?
it looks like it got standardized as OpenMetrics. The spec is obviously quite wordy, a short overview is available here.
To make Prometheus scrape it, you just have to add the metrics endpoint to Prometheus config, and it will periodically dial it.
Prometheus metrics is good and modern way for a centralized monitoring, but just some stat into systemd journal would be as good when people don't run Prometheus.
ps. Just an example Prometheus metrics for our debuginfod instance: (how simple they look) https://debuginfod.altlinux.org/metrics https://debuginfod.elfutils.org/metrics
Yes, I think some statistics printed to the log/stdout from time to time would already help a lot.
It should be possible for users to see the current state of monitoring - e.g. which logs are being monitored, how recently they were contacted, what the backlog is
Maybe this could be provided by an optional HTTP server?