Announcement

Collapse
No announcement yet.

ERROR: Description Table hrStorageSize : INTEGER length too long (5 bytes)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ERROR: Description Table hrStorageSize : INTEGER length too long (5 bytes)

    Hi,

    How I do to solve this problem ?

    check_centreon_snmp_memory -H server1 -C public -v 2c -w 80 -c 90
    ERROR: Description Table hrStorageSize : INTEGER length too long (5 bytes).

    I saw somethings about change the plugin of int to big int. How I do this ?

    Thanks
    Last edited by diogocunha81; 29 February 2012, 02:01.

  • #2
    Can you try a snmpwalk on tihs OID .1.3.6.1.2.1.25.2.3.1.5

    Code:
    snmpwalk -c public -v 2c server1 .1.3.6.1.2.1.25.2.3.1.5
    Centreon Syslog Module Manager/Developper
    Centreon E2S Module Manager/Developper
    Centreon Enterprise Server (2.x / 3.x) : Centreon Engine 1.3.x / 1.4.x, Centreon Broker 2.6.x / 2.8.x , Centreon 2.x, Centreon-Syslog 1.5.x, Centreon E2S 2.0
    Nagios 3.x et NDOutil 1.x

    Comment


    • #3
      Hello,

      Thanks for reply.

      snmpwalk -c public -v 2c server1 .1.3.6.1.2.1.25.2.3.1.5
      HOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 16748544
      HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 15603353
      HOST-RESOURCES-MIB::hrStorageSize.4 = INTEGER: 92076391
      HOST-RESOURCES-MIB::hrStorageSize.5 = INTEGER: 0
      HOST-RESOURCES-MIB::hrStorageSize.6 = INTEGER: 0
      HOST-RESOURCES-MIB::hrStorageSize.7 = INTEGER: 0
      HOST-RESOURCES-MIB::hrStorageSize.8 = INTEGER: 0
      HOST-RESOURCES-MIB::hrStorageSize.9 = INTEGER: 10819922
      HOST-RESOURCES-MIB::hrStorageSize.10 = INTEGER: 0
      HOST-RESOURCES-MIB::hrStorageSize.11 = INTEGER: 0
      HOST-RESOURCES-MIB::hrStorageSize.12 = INTEGER: 92076391
      HOST-RESOURCES-MIB::hrStorageSize.13 = INTEGER: 92076391
      HOST-RESOURCES-MIB::hrStorageSize.14 = INTEGER: 10819871
      HOST-RESOURCES-MIB::hrStorageSize.15 = INTEGER: 10819871
      HOST-RESOURCES-MIB::hrStorageSize.16 = INTEGER: 70002016
      HOST-RESOURCES-MIB::hrStorageSize.17 = INTEGER: 132832708
      HOST-RESOURCES-MIB::hrStorageSize.18 = INTEGER: 215855618
      HOST-RESOURCES-MIB::hrStorageSize.19 = INTEGER: 70002164
      HOST-RESOURCES-MIB::hrStorageSize.20 = INTEGER: 536870912
      HOST-RESOURCES-MIB::hrStorageSize.21 = INTEGER: 0

      I tested every command this script (check_centreon_snmp_memory)...my problem stay in script some calculated return issue.

      my $OID_hrStorage_size = ".1.3.6.1.2.1.25.2.3.1.5";
      my $OID_Swap_storage_size = ".1.3.6.1.2.1.25.2.3.1.5.".$indexV;
      my $OID_RealM_storage_size = ".1.3.6.1.2.1.25.2.3.1.5.".$indexR;
      my $OID_Cache_storage_size = ".1.3.6.1.2.1.25.2.3.1.5.".$indexC;

      my $total_mem = $session->get_table(Baseoid => $OID_hrStorage_size);
      if (!defined($total_mem)) {
      printf("ERROR: Description Table hrStorageSize : %s.\n", $session->error);
      $session->close;
      exit $ERRORS{'UNKNOWN'};
      }

      Thanks so much.
      Diogo

      Comment


      • #4
        What version of net-snmp-perl do you use ?
        Centreon Syslog Module Manager/Developper
        Centreon E2S Module Manager/Developper
        Centreon Enterprise Server (2.x / 3.x) : Centreon Engine 1.3.x / 1.4.x, Centreon Broker 2.6.x / 2.8.x , Centreon 2.x, Centreon-Syslog 1.5.x, Centreon E2S 2.0
        Nagios 3.x et NDOutil 1.x

        Comment


        • #5
          I'm using net-snmp-perl below

          Name : net-snmp-perl
          Arch : x86_64
          Epoch : 1
          Version : 5.3.2.2
          Release : 9.el5
          Size : 430 k

          Thanks

          Comment


          • #6
            Nobody ?

            Please help me.

            Comment


            • #7
              I solved my problem develop a new script.

              Code:
              #!/bin/bash
              usage() {
                      echo "Hosts monitoring program."
                      echo "usage : check_snmp_memory [ -h for help ] hostname device_number warning critical"
                      echo
                      echo "To find device numbers, execute command below"
                      echo "snmpwalk -v2c  -c public <hostname> .iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageDescr"
                      echo ""
              }
              
              while true ; do
                case $1 in
                  -h) usage ; exit 0 ;;
                      *) break ;;
                esac
              done
              
              host=$1
              device=$2
              warnpercentage=$3
              maxpercentage=$4
              
              #echo "${host} ${device} ${warnpercentage} ${maxpercentage}"
              
              
              hdmib=".iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry"
              psmib=".iso.org.dod.internet.private.enterprises.ucdavis.prTable.prEntry.prErrMessage"
              
              command='snmpget -v2c -Cf -Oqv -c public ${host} ${hdmib}.${item}.${device} | grep -v "No Such Object available"'
              
              size=`item=hrStorageSize eval ${command}`
              used=`item=hrStorageUsed eval ${command}`
              
              if [ -z "$size" -o -z "$used" ]
                   then
                   echo "${devicename}@${host} : no response from host"
              else
                   percentageused=$((100*${used}/${size}))
                   if [ ${percentageused} -ge ${maxpercentage} ] ; then
                       devicename=`item=hrStorageDescr eval ${command}`
                       blocksize=`item=hrStorageAllocationUnits eval ${command}|cut -d' ' -f1`
                       free=$(((${size}-${used})*${blocksize}/1024/1024))
                       sizem=$((${size}*${blocksize}/1024/1024))
                       echo "${devicename}@${host} : ${percentageused}% used (${free}M free / ${sizem}M total)"]
                       exit 2;
                   elif [ ${percentageused} -ge ${warnpercentage} ] ; then
                       devicename=`item=hrStorageDescr eval ${command}`
                       blocksize=`item=hrStorageAllocationUnits eval ${command}|cut -d' ' -f1`
                       free=$(((${size}-${used})*${blocksize}/1024/1024))
                       sizem=$((${size}*${blocksize}/1024/1024))
                       echo "${devicename}@${host} : ${percentageused}% used (${free}M free / ${sizem}M total)"]
                       exit 1;
                  elif [ ${percentageused} -lt ${warnpercentage} ] ; then
                       devicename=`item=hrStorageDescr eval ${command}`
                       blocksize=`item=hrStorageAllocationUnits eval ${command}|cut -d' ' -f1`
                       free=$(((${size}-${used})*${blocksize}/1024/1024))
                       sizem=$((${size}*${blocksize}/1024/1024))
                       echo "${devicename}@${host} : ${percentageused}% used (${free}M free / ${sizem}M total)"]
                       exit 0;
                  fi
              fi

              Comment


              • #8
                Hi,

                I think the better solution is to add this line after the session in centreon's plugin:

                $session->max_msg_size(10000);
                Open Source Monitoring Addict
                OS: Ubuntu / Debian / CentOS / RedHat / Solaris / Arch Linux / Open Suse


                ! NO SUPPORT IN PRIVATE MESSAGE !

                Comment


                • #9
                  I have the same problem :

                  [[email protected] libexec]# ./check_centreon_snmp_remote_storage -H SERVER -C xxxxxx -n -d "Partition"
                  ERROR: The INTEGER length is too long (5 bytes).

                  The SNMPWALK works :

                  [[email protected] libexec]# snmpwalk SERVER -v 2c -c xxxxxx .1.3.6.1.2.1.25.2.3.1.3.22 ; snmpwalk SERVER -v 2c -c xxxxxx .1.3.6.1.2.1.25.2.3.1.4.22 ; snmpwalk SERVER -v 2c -c xxxxxx .1.3.6.1.2.1.25.2.3.1.5.22 ; snmpwalk SERVER -v 2c -c xxxxxx .1.3.6.1.2.1.25.2.3.1.6.22
                  HOST-RESOURCES-MIB::hrStorageDescr.22 = STRING: /partition
                  HOST-RESOURCES-MIB::hrStorageAllocationUnits.22 = INTEGER: 512 Bytes
                  HOST-RESOURCES-MIB::hrStorageSize.22 = INTEGER: 3896470043
                  HOST-RESOURCES-MIB::hrStorageUsed.22 = INTEGER: 2719468330

                  The "$session->max_msg_size(10000);" doesn't change anything...
                  Last edited by sergio78_; 8 November 2012, 16:01.

                  Comment


                  • #10
                    Nobody have the same problem !?

                    Comment

                    Working...
                    X