Ad Widget

Collapse

ZABBIX refuseS to get TEMP VALUE FROM HP PROCURVE SWITCH

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TASSA
    Junior Member
    • Dec 2014
    • 27

    #1

    ZABBIX refuseS to get TEMP VALUE FROM HP PROCURVE SWITCH

    Hello guys im tryng to get temrurture output from my HP PROCURVE 5400 SWITCH
    but i get ithis

    " Received value [26C] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]"

    i have tried all type of information but no sucess !

    FYI
    snmpwlk works fine
    snmpwalk -On -v 2c -c hhhhhhhh x.x.x.x .1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3.0
    .1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3.0 = STRING: "26C"

    ANY HELP WILL BE APPRICIATE
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    Yes, snmpwalk shows you that you are getting a String "26C", not a number "26"

    Try to use "Text" for Type of information.
    But you will lose the possibility to compare temperature with any limits.

    To get a number from string you have to write your own external script, which will collect SNMP information, strip letter "C" from the end of string and return only number to Zabbix.

    Say Thank you to HP!
    Sincerely yours,
    Aleksey

    Comment

    • TASSA
      Junior Member
      • Dec 2014
      • 27

      #3
      ZABBIX refuseS to get TEMP VALUE FROM HP PROCURVE SWITCH'

      Hi Aib 10x for your prompt response
      I have just came out with a small bash script which work fine for me from the shell
      But not working on the gui
      Im using the external check
      But I still get the error
      "Received value [26C] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]"

      That the script from the shell situated at /etc/zabbix/externalscripts
      Im running the script
      > ./temcheck x.x.x.x
      >28
      That’s the script
      < cat tempcheck.sh
      #!
      /bin/bash
      snmpwalk -On -v 2c -c x.x.x.x $1 .1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3.0 | awk '{gsub("\"","",$4);gsub("C","",$4);print $4

      Comment

      • TASSA
        Junior Member
        • Dec 2014
        • 27

        #4
        Originally posted by TASSA
        Hi Aib 10x for your prompt response
        I have just came out with a small bash script which work fine for me from the shell
        But not working on the gui
        Im using the external check
        But I still get the error
        "Received value [26C] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]"

        That the script from the shell situated at /etc/zabbix/externalscripts
        Im running the script
        > ./temcheck x.x.x.x
        >28
        That’s the script
        < cat tempcheck.sh
        #!
        /bin/bash
        snmpwalk -On -v 2c -c x.x.x.x $1 .1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3.0 | awk '{gsub("\"","",$4);gsub("C","",$4);print $4



        NOW I HAVE THIS ERROR




        "Received value [No log handling enabled - turning on stderr logginggetaddrinfo: .1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3.0 Name or service not knownsnmpwalk: Unknown host (.1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3.0)] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]"

        Comment

        • aib
          Senior Member
          • Jan 2014
          • 1615

          #5
          step by step.
          1) script has to be in the directory, described in zabbix_server.conf
          Code:
          ># grep -i external /etc/zabbix/zabbix_server.conf
          #       Specifies how long we wait for agent, SNMP device or external check (in seconds).
          ### Option: ExternalScripts
          #       Full path to location of external scripts.
          # ExternalScripts=${datadir}/zabbix/externalscripts
          ExternalScripts=/usr/lib/zabbix/externalscripts
          2) I changed a little bit your script
          Code:
          # cat tempcheck.sh
          #!/bin/bash
          /usr/bin/snmpwalk -On -v 2c -c public $1 .1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3.0 | awk -F'"' '{print $2}' | sed 's/C//g'
          3) Then I tested it with my switch:
          Code:
          # ./tempcheck.sh 1x.1x.1x.1x
          26
          4) Then I created Item,as it was described in https://www.zabbix.com/documentation...types/external
          Code:
          Name: Device Temperature
          Type: External check
          Key: tempcheck.sh[{HOST.CONN}]
          Type of information: Numeric(float)
          Units: °C
          5) Then I got data from device:
          Attached Files
          Sincerely yours,
          Aleksey

          Comment

          • TASSA
            Junior Member
            • Dec 2014
            • 27

            #6
            temp problem

            Originally posted by aib
            step by step.
            1) script has to be in the directory, described in zabbix_server.conf
            Code:
            ># grep -i external /etc/zabbix/zabbix_server.conf
            #       Specifies how long we wait for agent, SNMP device or external check (in seconds).
            ### Option: ExternalScripts
            #       Full path to location of external scripts.
            # ExternalScripts=${datadir}/zabbix/externalscripts
            ExternalScripts=/usr/lib/zabbix/externalscripts
            2) I changed a little bit your script
            Code:
            # cat tempcheck.sh
            #!/bin/bash
            /usr/bin/snmpwalk -On -v 2c -c public $1 .1.3.6.1.4.1.11.2.14.11.1.2.8.1.1.3.0 | awk -F'"' '{print $2}' | sed 's/C//g'
            3) Then I tested it with my switch:
            Code:
            # ./tempcheck.sh 1x.1x.1x.1x
            26
            4) Then I created Item,as it was described in https://www.zabbix.com/documentation...types/external
            Code:
            Name: Device Temperature
            Type: External check
            Key: tempcheck.sh[{HOST.CONN}]
            Type of information: Numeric(float)
            Units: °C
            5) Then I got data from device:
            Hi aib I followed you instruction and it looks okay but zabbix complaining "Timeout while executing a shell script"
            I guess I need to increase time out
            What do need to change
            10x
            Tal


            " zabbix.conf"

            ### Option: Timeout
            # Specifies how long we wait for agent, SNMP device or external check (in seconds).
            #
            # Mandatory: no
            # Range: 1-30
            # Default:
            # Timeout=3

            Comment

            • TASSA
              Junior Member
              • Dec 2014
              • 27

              #7
              Hp temp is working 10x !!

              Originally posted by TASSA
              Hi aib I followed you instruction and it looks okay but zabbix complaining "Timeout while executing a shell script"
              I guess I need to increase time out
              What do need to change
              10x
              Tal


              " zabbix.conf"

              ### Option: Timeout
              # Specifies how long we wait for agent, SNMP device or external check (in seconds).
              #
              # Mandatory: no
              # Range: 1-30
              # Default:
              # Timeout=3
              Hi Aib u can ignore my last replay it works perfect (-:
              Thank you !!!

              Comment

              • aib
                Senior Member
                • Jan 2014
                • 1615

                #8
                Any time!
                BTW, I use Timeout=30 for my server.
                Sincerely yours,
                Aleksey

                Comment

                Working...