Ad Widget

Collapse

How to graph SNMP string values?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • athomas
    Junior Member
    • May 2007
    • 1

    #1

    How to graph SNMP string values?

    I've got linux clients with net-snmp configured to run my own scripts, returning the VM size of a process.

    From my zabbix host, I can retrieve the current value with a command like this:

    snmpget -v 1 -c secret host01 1.3.6.1.4.1.13941.200.17.101.1

    Which returns:
    SNMPv2-SMI::enterprises.13941.200.17.101.1 = STRING: "1166"

    How can I get zabbix to retrieve this value regularly and treat it as an integer; storing and graphing historic values etc.?

    Attempting to get zabbix to treat the value as a number gives me this error:

    "Cannot store SNMP string value (ASN_OCTET_STR) in item having numeric type"

    The script is returning a string via SNMP, and I don't think that snmp allows me to change that, but it is a string made up exclusively of numeric characters. ;-)


    Thanks in advance for advice on how I can end up with zabbix showing graphs of how this value has changed over time.
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    The automatic conversion is not supported in 1.1.x, yet I'm pretty sure it already works perfectly in 1.3.x (pre 1.4).
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • paultorben
      Junior Member
      • Apr 2007
      • 10

      #3
      Originally posted by athomas
      The script is returning a string via SNMP, and I don't think that snmp allows me to change that, but it is a string made up exclusively of numeric characters. ;-)

      Have you tried doing an SNMPwalk to see all available values? For many values I'm collecting there are string and integer values available - and even when I'm collecting the String value (as defined by the results returned by snmpwalk) if I define the 'item' in Zabbix as float is gets the numeric values properly.

      Comment

      • AdrianW
        Junior Member
        • Jun 2007
        • 7

        #4
        Use "Numeric (float)" setting for 1.4

        Originally posted by paultorben
        Have you tried doing an SNMPwalk to see all available values? For many values I'm collecting there are string and integer values available - and even when I'm collecting the String value (as defined by the results returned by snmpwalk) if I define the 'item' in Zabbix as float is gets the numeric values properly.
        Thank you. I am working with the 1.4 release and I have found this to be true:

        The automatic conversion only appear to works with the "Numeric (float)" under the "Type of information" setting for an item. "Numeric (integer 64bit)" does not perform the automatic conversion.

        The automatic conversion is a helpful feature.

        Comment

        Working...