discovery.snmpGetTable

discovery.snmpGetTable(target, table_oid, column_table, [binary_oid_list])

Performs an SNMP query that returns a table on the target. Returns a list of DiscoveredSNMPRow nodes or none if the SNMP query failed. The table_oid parameter specifies the SNMP OID for the table; the column OIDs in the table are mapped to attribute names using the column_table. Not all column OIDs need to be listed in the storage table. If a column OID is not mapped it will be dropped and not stored in the DiscoveredSNMPRow nodes. Similarly, if a mapping for a non-existent column OID is given, it will be ignored. Binary data (SNMP octet strings with embedded nuls) such as IP or MAC addresses must be flagged before they can be recovered correctly. The optional binary_oid_list parameter (available in BMC Discovery 10.0 and later) is a list of OIDs that contain binary data. For example, to retrieve a table of storage information:

table storage_map 1.0
  "1" -> "index";
  "2" -> "type";
  "3" -> "descr";
  "4" -> "allocation_units";
end table;
pattern example 1.0
...
  body
    rows := discovery.snmpGetTable(host, "1.3.6.1.2.1.99.99", storage_map, ["2"]);
...

OID usage with snmpGetTable

When using snmpGetTable, specifying the OID of a table object, a DiscoveredSNMPRow node is created for every requested value in every row in the table rather than a single node for each row in the table. To avoid this you should use the OID for the entry object. For example, rather than using .1.3.6.1.2.1.2.2 (ifTable) you need to use .1.3.6.1.2.1.2.2.1 (ifEntry).

When binary data is successfully retrieved, you can only use the binary functions to process the data.

Performs an SNMP query on the target and returns a DiscoveredSNMP node.
Was this page helpful? Yes No Submitting... Thank you

Comments