Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5038

2.0.0rc6 converts time incorrectly when seconds units chosen for snmp values

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.0.0rc6
    • Frontend (F)
    • Gentoo Linux

      Create an snmp template, apply it to a host with a very high uptime, create item for uptime with 's' as units, let zabbix perform automatic conversion to days+hours, converted value seems to be 240 days less than actual.

      example:
      This is the snmp oid I grab:
      DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (2212130098) 256 days, 0:48:20.98

      It gets put into db correctly after multiplying by 0.01 to convert timeticks to seconds:
      System Uptime 22126018.5

      now, specify 's' as units:
      System Uptime 8m 16d 2h

      Zabbix is reporting the uptime as 16 days instead of 256 days.
      This occurs regardless of weather unsigned int or float or used to hold datatype.

      To verify the correct result should be 256:
      matt@hyperion ~/dev/gentooZabbixTemplates $ bc
      bc 1.06.95
      Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
      This is free software with ABSOLUTELY NO WARRANTY.
      For details type `warranty'.
      22121300 / 60 / 60 / 24
      256

            Unassigned Unassigned
            mattm Matthew Marlowe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: