Ad Widget

Collapse

SNMP queries sometimes return bad values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oct
    Junior Member
    • Dec 2009
    • 22

    #1

    SNMP queries sometimes return bad values

    Hello,

    I'm trying to monitor a Netgear ReadyNas storage device. I found that, from time to time, some snmp variables return out of range value. For example, I monitor the diks temperature and, if it usually returns around 86 (F), sometimes it reads a value like 18446744072489824656. This value ruins all graphs and triggers.

    Is there a way to igonre those values and, for that read keep the value of previous read? Something like "if the value is bigger than XXX, ignore it and keep the previous value in history". I could use a calculated item for that.

    I have already tried to contact Netgear support, but they didn't help at all.

    Thanks

    Oct
  • mbsit
    Senior Member
    • Sep 2012
    • 130

    #2
    Hi
    As I know Zabbix, this is the Negative value when you have decimal Type of Item.
    Change it to float (which accept negative) and we will see.

    Yes its true, sometimes SNMP return -1 or -3.
    Zabbix have not functionality like - "if value ... "

    Bests,
    Grzegorz

    --
    Wdrożenia, usługi IT - Warszawa
    Pozdrawiam
    Grzegorz Grabowski
    ____
    Wdrożenia, szkolenia, umowy serwisowe
    Warszawa - Polska

    Comment

    • oct
      Junior Member
      • Dec 2009
      • 22

      #3
      Hi,

      I changed all affected items to "Nnumeric (Float)" with no luck. Here are some sample reads after the change:

      2012-09-26 11:55:17 1348653317 32
      2012-09-26 11:54:50 1348653290 32
      2012-09-26 11:54:19 1348653259 32
      2012-09-26 11:53:48 1348653228 32
      2012-09-26 11:53:19 1348653199 32
      2012-09-26 11:52:48 1348653168 32
      2012-09-26 11:52:18 1348653138 32
      2012-09-26 11:51:49 1348653109 32
      2012-09-26 11:51:19 1348653079 131081
      2012-09-26 11:50:48 1348653048 32
      2012-09-26 11:50:20 1348653020 32
      2012-09-26 11:49:49 1348652989 32
      2012-09-26 11:49:20 1348652960 32
      ...
      2012-09-26 11:03:48 1348650228 32
      2012-09-26 11:03:19 1348650199 32
      2012-09-26 11:02:49 1348650169 32
      2012-09-26 11:02:19 1348650139 -146697832
      2012-09-26 11:01:50 1348650110 32
      2012-09-26 11:01:19 1348650079 32
      2012-09-26 11:00:49 1348650049 32
      2012-09-26 11:00:19 1348650019 32

      As you can see, it keeps reading bad values from time to time. I'm pretty sure that it's a problem of the ReadyNas and not Zabbix, but it would be nice to find a workaround to ignore those values.

      Thanks.

      Oct

      Comment

      • mbsit
        Senior Member
        • Sep 2012
        • 130

        #4
        Ok,
        If you want to parse data before zabbix will get it, you have to use External check.
        You can do small script like the one.

        Code:
        #!/bin/bash
        # $1 = IP of snmp host
        # $2 = community
        # $3 = port
        # $4 = OID
        OUT=`snmpget -Oqv -c $2 -v2c ${1}:${3} "$4"`
        if [ "$OUT" -lt "10000" ]; then
        echo $OUT
        fi
        Pozdrawiam
        Grzegorz Grabowski
        ____
        Wdrożenia, szkolenia, umowy serwisowe
        Warszawa - Polska

        Comment

        • oct
          Junior Member
          • Dec 2009
          • 22

          #5
          I think I found the problem with the strange values. I was polling the Readynas every 30 seconds and that seemed to hang its snmp daemon. I changed the interval to 120 sec. for every item and it's far more stable now. For about 5 hours, I have not had a wrong read.

          Anyway, you suggestion can help me in other cases. If I understand you script, it will poll an SNMP OID and, if the value is smaller than 10000, it will return the value itself. What happens if the value is bigger? The script will not return the value but, what will Zabbix display? The previous value, 0, "no data"?

          Thanks

          Oct

          Comment

          • mbsit
            Senior Member
            • Sep 2012
            • 130

            #6
            In this script - nothing.

            Probably, zabbix will go to UNSUPPORTED for while, (it is defined in Administration-General-Other). If you set 'Refresh unsupported items (in sec)' for about 60-120 sec, then you will not have any influence on graphs and triggers.
            Of curse, you can add 'else' section and you will get what you want.
            If you would like to have previous value, you have to remember it to file (the easiest way).

            Bests,
            Grzegorz

            --
            Wdrożenia, usługi IT - Warszawa
            Pozdrawiam
            Grzegorz Grabowski
            ____
            Wdrożenia, szkolenia, umowy serwisowe
            Warszawa - Polska

            Comment

            Working...