Ad Widget

Collapse

Filter SNMP data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Voxie
    Junior Member
    • Jul 2009
    • 24

    #1

    Filter SNMP data

    Hi,

    I have made a template for our bladecenter. (IBM Bladecenter H)

    But some SNMP items are giving me values like :
    - 40.00 Centrigrade
    - 2920 Watts

    Is it possible to convert it into numbers:
    - 40.00
    - 2920
    (Filter the text)

    I tried to find my answer on the wiki page but couldn't find a solution.


    Thank you for your time.
  • untergeek
    Senior Member
    Zabbix Certified Specialist
    • Jun 2009
    • 512

    #2
    Is there a different OID which provides the same data?

    I know in snmpget and snmpwalk you can specify to omit the units. I wonder if Zabbix could have that in place by default...

    Comment

    • pcamelio
      Member
      • Jul 2005
      • 67

      #3
      I have the same bladecenter as well a BCS.
      Unfortunately, the SNMP MIB did not give other values.

      One way to overcome the pb is to make a script on the zabbix server which using snmpwalk grab the value and correct it with sed/awk

      the result can be send to an item value to with zabbix_sender.

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        snmpwalk prints units if they are specified by a known mib - zabbix always grabs the raw value. if the device is only providing result with additional strings attached, i'd probably report that as a bug against the vendor of that device

        there should always be an oid that provides the numeric value without silly strings attached.
        Zabbix 3.0 Network Monitoring book

        Comment

        • untergeek
          Senior Member
          Zabbix Certified Specialist
          • Jun 2009
          • 512

          #5
          This could be accomplished by using the -OU option on an snmpwalk:


          Code:
          -O OUTOPTS		Toggle various defaults controlling output display:
          			  0:  print leading 0 for single-digit hex characters
          			  a:  print all strings in ascii format
          			  b:  do not break OID indexes down
          			  e:  print enums numerically
          			  E:  escape quotes in string indices
          			  f:  print full OIDs on output
          			  n:  print OIDs numerically
          			  q:  quick print for easier parsing
          			  Q:  quick print with equal-signs
          			  s:  print only last symbolic element of OID
          			  S:  print MIB module-id plus last element
          			  t:  print timeticks unparsed as numeric integers
          			  T:  print human-readable text along with hex strings
          			  u:  print OIDs using UCD-style prefix suppression
          			  U:  don't print units
          			  v:  print values only (not OID = value)
          			  x:  print all strings in hex format
          			  X:  extended index format
          See the "don't print units" bit there? If you still see units using the -OU, then it's a bug with the MIB/Provider.

          Comment

          • Voxie
            Junior Member
            • Jul 2009
            • 24

            #6
            Originally posted by pcamelio
            I have the same bladecenter as well a BCS.
            Unfortunately, the SNMP MIB did not give other values.

            One way to overcome the pb is to make a script on the zabbix server which using snmpwalk grab the value and correct it with sed/awk

            the result can be send to an item value to with zabbix_sender.
            Do you have made a script like that ?
            Or are there similair examples availible ?

            Comment

            • Voxie
              Junior Member
              • Jul 2009
              • 24

              #7
              Does somebody have an idea ?

              Comment

              Working...