Closed lelutin closed 2 months ago
note, I've chosen to split the version information out into a dedicated ...build_info
time series. This makes it possible to graph the timestamp normally without risking discontinuity if needrestart and/or perl is upgraded and thus the labels change, and the dedicated metric can be used just for aggregation if needs be.
I've reworked this branch to incorporate feedback from @anarcat and other details found while reading the OpenMetrics spec more in depth and I've just force-pushed the result.
what's to be expected as being changed in this force-push;
-l
option in combination with -o
now requires root access, otherwise the metric for outdated libraries was always set to 0 since an unprivileged user can't dig around all running processes to find out this information# EOF\n
was added to properly end the exposition
as defined by OpenMetricsThanks!
awesome, thanks for the fixes
This new
-o
option will make needrestart output information in a format that can be scraped by Prometheus or any other daemon that ingests OpenMetrics format.The -l, -w and -k options can be used in combination with -o in order to choose what information gets exported.
(Closes: #291)