Ad Widget

Collapse

SNMP agent uptime with 1.6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • troffasky
    Senior Member
    • Jul 2008
    • 567

    #1

    SNMP agent uptime with 1.6

    I'm could have sworn this worked in 1.4. What I want to do is monitor the uptime of a device with SNMP, so that I can alert if it goes back to 0 [ie somebody has rebooted the device or power has been lost]. I am using sysUpTimeInstance, which when polled with snmpget gives:

    .1.3.6.1.2.1.1.3.0 = Timeticks: (322630203) 37 days, 8:11:42.03

    If I create an item that's unsigned integer, units set to 'uptime', Zabbix tells me it's uptime is 3731 days, which is two orders of magnitude out. I have tested this on two 1.6.5 installations against two different SNMP devices and get the same results. Changing the units to blank confirms that Zabbix is getting the correct number of seconds.
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    from a quick glance (sorry, i did not have time before ), it looks to me that zabbix is doing everything correctly and snmp item is returning data with millisecond precision or something.

    i'm not aware of a simple shell version to calculate time period, but try something as simple as :
    Code:
    date -d@$[$(date "+%s")-322630203]
    Zabbix 3.0 Network Monitoring book

    Comment

    • troffasky
      Senior Member
      • Jul 2008
      • 567

      #3
      If Zabbix is expecting seconds and the device is giving milliseconds, then presumably I could solve the problem by using a multiplier of 0.01, problem solved :-)

      Comment

      • troffasky
        Senior Member
        • Jul 2008
        • 567

        #4
        Indeed, a custom multiplier of 0.01 has fixed it.

        Question is, is this a bug in Zabbix? The 'timeticks' data type is hundredths of a second [not milliseconds]; Zabbix should be looking at the installed MIBs when trying to interpret data it's polling with SNMP. This would also eliminate the need to create throw maps and manually specify data types in many cases. There's already a feature request for this, so vote for ZBXNEXT-2 if you think it would be a good idea.

        Comment

        Working...