leograba / TorizonOSBuildStatus

Dashboard to display Torizon OS build pipelines status
MIT License
1 stars 1 forks source link

Add uptime to custom metrics #18

Closed leograba closed 2 months ago

leograba commented 3 months ago

Uptime is an interesting metric that may easily indicate reboots - planned or unexpected.

leograba commented 2 months ago

I've experimented with the https://docs.fluentbit.io/manual/v/dev-2.2/pipeline/inputs/head input, but the exec example we have on https://developer.toradex.com/torizon/torizon-platform/device-monitoring-in-torizoncore/#example-disk-usage-custom-metric makes it just so easy:

cut -d ' ' -f1 /proc/uptime | awk '{print "{\"uptime\":" $1 "}"}'

So I might not waste too much more time for this by now.

leograba commented 2 months ago

This is working well, it is possible to see the reboots in the charts:

image