How i convert system_uptime{host="$server"}

Hi,
i need help in metrics system_uptime{host="$server"} how i convert this value into hours.
for example if system_uptime{host="$server"} = 17976
how i convert this 17976 into hours ? I need formula

well, if i understood you correctly, you want this:

system_uptime{host="$server"} /3600 (60minutes x 60seconds)

of course you only need this for alerting as in grafana you can choose the units to seconds and it will automatically translate the chart scale to the best time unit

1 Like