For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

JRahm's avatar
JRahm
Icon for Admin rankAdmin
Apr 24, 2015

snmp oid question

posting on behalf of a community member:

Subject: snmpget / snmpwalk on BIG IP 11.x

Hello all,

i have a little problem. I try to get some snmp information from one of our big-ips (LTM Modul) via snmpwalk / snmpget. In version 9 it was possible to do the following:

 

Command: snmpget -v2c -c public external F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState.ipv4.4.10.1.0.20
Result: F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState.ipv4."10.1.0.20" = INTEGER: green(1)

 

So everthing works fine. In BIG-IP Version 11, this is not longer possible. When i try the following:

 

Command: snmpget -v 2c -c public external F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState.ipv4.4.10.1.0.20
Result: F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState.ipv4.4.10.1.0.20: Unknown Object Identifier (Index out of range: ipv4 (ltmNodeAddrStatusName))

 

i get an error. I find out, if i convert the ip address, and the common partion, from ascii to hex and modify the OID, it works with snmpwalk:

 

Command: snmpwalk -v 2c -c public external F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState.17.47.67.111.109.109.111.110.47.49.48.46.49.46.48.46.50.48
Result: F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/10.1.0.20" = INTEGER: green(1)

 

Is there any way to use the old format without to convert anything to hex?

Thanks for your help

Best regards

Sven

4 Replies

  • I’ve found great use out of some of the snmpwalk command options. First, walk the oid by name (as you have) so you can tell what is what:

     

    [root@ltm1:Active:Standalone] config  snmpwalk -v 2c -c f5dc localhost F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState
    F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/10.10.10.1" = INTEGER: blue(4)
    F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/my.host.com" = INTEGER: blue(4)
    F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/10.43.190.50" = INTEGER: blue(4)
    

     

    then use the “-On” option to reveal the numeric oid for you, and you can do a line by line compare to pull out the appropriate oidstrings you will use.

     

    [root@ltm1:Active:Standalone] config  snmpwalk -v 2c -c f5dc -On localhost F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState
    .1.3.6.1.4.1.3375.2.2.4.3.2.1.3.18.47.67.111.109.109.111.110.47.49.48.46.49.48.46.49.48.46.49 = INTEGER: blue(4)
    .1.3.6.1.4.1.3375.2.2.4.3.2.1.3.19.47.67.111.109.109.111.110.47.109.121.46.104.111.115.116.46.99.111.109 = INTEGER: blue(4)
    .1.3.6.1.4.1.3375.2.2.4.3.2.1.3.20.47.67.111.109.109.111.110.47.49.48.46.52.51.46.49.57.48.46.53.48 = INTEGER: blue(4)
    

     

    snmptranslate is your friend as well, though with oids with quotes in them, you will need to escape them:

     

    [root@ltm1:Active:Standalone] config  snmptranslate -On F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState.\"/Common/10.10.10.1\"
    .1.3.6.1.4.1.3375.2.2.4.3.2.1.3.18.47.67.111.109.109.111.110.47.49.48.46.49.48.46.49.48.46.49
    

     

  • Is there any other way to use the returned index such as F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/10.10.10.1"?

     

    It will be a tremendous amount of work to manually create graphs for what should be automated based on snmpwalk.

     

    Why will v11 not support an snmpwalk in this format: F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/10.10.10.1" = INTEGER: blue(4)

     

    but it will in this format: .1.3.6.1.4.1.3375.2.2.4.3.2.1.3.18.47.67.111.109.109.111.110.47.49.48.46.49.48.46.49.48.46.49 = INTEGER: blue(4)

     

    Thanks,

     

    Peter

     

  • Why will v11 not support an snmpwalk in this format: F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/10.10.10.1" = INTEGER: blue(4)

    i may be lost but isn't it what snmpwalk without -On returns?

     

    [root@ve11c:Active:In Sync] config  tmsh show sys version|head
    Sys::Version
    Main Package
      Product     BIG-IP
      Version     11.6.0
      Build       3.36.412
      Edition     Engineering Hotfix HF3
      Date        Tue Dec 16 19:25:52 PST 2014
    
    [root@ve11c:Active:In Sync] config  snmpwalk -v 2c -c public localhost F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState
    F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/192.168.10.13" = INTEGER: blue(4)
    F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/74.125.200.26" = INTEGER: blue(4)
    F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/200.200.200.101" = INTEGER: blue(4)
    F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/200.200.200.102" = INTEGER: blue(4)
    F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/200.200.200.103" = INTEGER: blue(4)
    F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/200.200.200.111" = INTEGER: blue(4)
    F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatusAvailState."/Common/200.200.200.112" = INTEGER: blue(4)
    

     

  • The problem is the " . If you put a backslash it will work.

     

    Example :

     

    [root@teste:Active:Standalone] config snmpwalk -v 2c -c public localhost ltmNodeAddrStatServerBytesOut."/Common/10.10.100.1"

     

    ltmNodeAddrStatServerBytesOut./Common/10.10.100.1: Unknown Object Identifier (Index out of range: /Common/10 (ltmNodeAddrStatNodeName))

     

    Now with the backslash:

     

    [root@teste:Active:Standalone] config snmpwalk -v 2c -c public localhost ltmNodeAddrStatServerBytesOut.\"/Common/10.10.100.1\"

     

    F5-BIGIP-LOCAL-MIB::ltmNodeAddrStatServerBytesOut."/Common/10.10.100.1" = Counter64: 282967458

     

    Hope it helps.

     

    Alex