UPTIME convert from seconds to day on Grafana?

I am configuring a metric, for Uptime of a device. Our Grafana is integrated with Zabbix. I am collecting the key data “sysUpTime.0” which are second. Can I convert Grafana from seconds to day?

Try unit format duration Seconds

Hello Torkel, thanks for the feedback.

When I do the snmpwalk command on the SysUptime key, it is returning the value in seconds (79669500) and in days (9 days). See command below:

snmpwalk -v 3 -a MD5 -A xxxx -X xxxx -u cis -l authpriv sysUpTime.0

DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (79669500) 9 days, 5:18:15.00

In zabbix, there is a Multiplier field, where I multiply the seconds by 0.01 and arrive in the 9 days. In Grafana, I can not do this, the value appears in the second without the multiplier. I would like it to appear the 9 days, according to SNMPWALK command

Did you try the unit duration? It will automatically format seconds to days, you specify unit in the options tab

Yes, I did,

I’m sending pictures of Grafana and Zabbix ( Zabbis is OK )

you screenshot does not show options tab, and it does not show you have selected the right Grafana unit in the Options tab of the singlestat panel!

1 Like

Hi brambila
you can try change the Options-Unit-seconds(s) and set the Decimals 0

form a chinese engineer :slight_smile:

1 Like

Hello! Any way to convert seconds into days in the Table not in the Singlestat?

hi works perfect, look at the photo

I encountered the same problem, Up time shows as Seconds by default, so I just included in the SELECT section of the Query editor the “math( /86400)” and the result shows the value in Days, you can put decimals to be more precise.

Note: I am using Grafana with Influx Db and Telegraf Plugin.
hope this helps :slight_smile: