centerclick / feedback

Issues, Bug Reports, and Feature Requests
7 stars 0 forks source link

Add uptime counter in seconds to System JSON output. #99

Closed netstx closed 1 year ago

netstx commented 1 year ago

This is a enhancement/software request.

On current stable version 2.7.0, the System JSON page displays uptime in human readable format. For automated monitoring/history purposes, it would be nice to have a separate variable, call it "sysup" for example, with time since boot in seconds. This could be obtained by reading the first number from file /proc/uptime (if available).

An extra uptime output seems redundant at first, but if replacing the existing "uptime" variable with a counter, the main webpage would need additional code to convert uptime seconds to human readable format as it currently displays.

I understand this same data point is now available via SNMP's sysUpTime OID, but the System JSON page can be used for scraping data with Prometheus, Telegraf and similar tools when collecting data via SNMP is not desired or possible.

Thank you.

dave4445 commented 1 year ago

FYI: Prometheus metrics exporter coming in #101

netstx commented 7 months ago

Thanks @dave4445 :)