discovery.snmpGetTable(target, table_oid, column_table) – (7.1 and later)

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 sub-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. 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
    rows := discovery.snmpGetTable(host, "", storage_map);

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 . (ifTable) you need to use . (ifEntry).

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