Ad Widget

Collapse

How does Zabbix calculate uptime?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jarne St
    Member
    • Sep 2019
    • 63

    #1

    How does Zabbix calculate uptime?

    I have an item SystemUptime monitord by an snmp agent (snmp version 2).
    Click image for larger version

Name:	Item.png
Views:	2606
Size:	42.2 KB
ID:	399478
    I want to monitor the time that the system is running. (uptime)
    In the latest data I see: 25 days, 03:33:20. But if I see go the value I see 2172853.

    How does Zabbix compute the uptime from the value 2172853 to 25 days, 03:33:20?
    Could anyone explain how this uptime is computed?

    And how can I represent this uptime (25 days, 03:33:20, not the value, but 25 days) in Grafana in a SingleStat panel.
    Click image for larger version

Name:	SingleStat Panel.png
Views:	2492
Size:	91.5 KB
ID:	399479
    Any help would be welcome!
  • lptarik
    Member
    • Oct 2021
    • 33

    #2
    Hello you can use duration unit in Grafana

    Comment

    • ISiroshtan
      Senior Member
      • Nov 2019
      • 324

      #3
      Common representation of uptime is number of seconds since system was booted. so:

      2172853 / 60 / 60 / 24 = 25.148761574074074074074074074074. so 25 full days

      0.148761574074074074074074074074 * 24 = 3.5702777777777777777777777777778 - 3 hours

      0.5702777777777777777777777777778 * 60 = 34.216666666666666666666666666667 - 34 minutes

      0.216666666666666666666666666667 * 60 = 13 - 13 second seconds

      Comment

      Working...