Ad Widget

Collapse

Can I return entire OID in LLD

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #1

    Can I return entire OID in LLD

    I have a device (old HP MSA P2000) that has a bunch of sensors at weird OID's, where the index is preceeded by a long string, and I'm not at all sure that string is fixed.

    Code:
    # snmpwalk -v2c -credacted 192.168.1.215 1.3.6.1.3.94.1.8.1.2
    SNMPv2-SMI::experimental.94.1.8.1.2.80.12.15.241.176.191.16.0.0.0.0.0.0.0.0.0.1 = INTEGER: 1
    SNMPv2-SMI::experimental.94.1.8.1.2.80.12.15.241.176.191.16.0.0.0.0.0.0.0.0.0.2 = INTEGER: 2
    SNMPv2-SMI::experimental.94.1.8.1.2.80.12.15.241.176.191.16.0.0.0.0.0.0.0.0.0.3 = INTEGER: 3
    SNMPv2-SMI::experimental.94.1.8.1.2.80.12.15.241.176.191.16.0.0.0.0.0.0.0.0.0.4 = INTEGER: 4
    SNMPv2-SMI::experimental.94.1.8.1.2.80.12.15.241.176.191.16.0.0.0.0.0.0.0.0.0.5 = INTEGER: 5
    SNMPv2-SMI::experimental.94.1.8.1.2.80.12.15.241.176.191.16.0.0.0.0.0.0.0.0.0.6 = INTEGER: 6
    SNMPv2-SMI::experimental.94.1.8.1.2.80.12.15.241.176.191.16.0.0.0.0.0.0.0.0.0.7 = INTEGER: 7
    SNMPv2-SMI::experimental.94.1.8.1.2.80.12.15.241.176.191.16.0.0.0.0.0.0.0.0.0.8 = INTEGER: 8
    SNMPv2-SMI::experimental.94.1.8.1.2.80.12.15.241.176.191.16.0.0.0.0.0.0.0.0.0.9 = INTEGER: 9
    I hesitate to hard code the .80.12.15.241.176.191.16.0.0.0.0.0.0.0.0.0. portion, though that works for this one particular MSA today (I have only one).

    That value comes from another OID, but it's returned as HEX, e.g.

    SNMPv2-SMI::experimental.94.1.8.1.1.80.12.15.241.176.191. 16.0.0.0.0.0.0.0.0.0.1 = Hex-STRING: 50 0C 0F F1 B0 BF 10 00 00 00 00 00 00 00 00 00

    Which is still not supported as best I can tell in the preprocessor directives (is it? E.g. https://support.zabbix.com/browse/ZBXNEXT-4497 )

    But all really want is the whole OID back, not just the index.

    Is there any way to retrieve, from a regular SNMP LLD discovery, the whole OID instead of just the index portion?

    Yes, I can write an external check, but this comes up more often than one might think, and I'm hoping there's some magic here I have been missing.
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    Just to answer my own question, the trick is to use {#SNMPINDEX} and not the vlaue returned which looks like an index, e.g. in the above it will give 80.12.15.241.176.191.16.0.0.0.0.0.0.0.0.0.1 and not 1 for the first item.

    Comment

    Working...