22
edits
Line 20: | Line 20: | ||
PPS: Not sure if works everywhere... '''write mib-data''' might be needed as well | PPS: Not sure if works everywhere... '''write mib-data''' might be needed as well | ||
=== SNMP Instance Discovery === | |||
Let's say we want to collect status of all interfaces on a node. | |||
Put OID of interest in "Parameter" field on "General" tab with {instance} suffix (.1.3.6.1.2.1.2.2.1.8.{instance}). | |||
Put something meaningful in "Description" filed on "General" tab, use {instance-name} macro to make this human-readable ("Interface status ({instance-name})"). | |||
Go to "Instance Discovery" tab. | |||
Pick "SNMP Walk - Values" as discovery method. | |||
Pick proper base OID as described in [[Creating SNMP table DCI]] (.1.3.6.1.2.1.2.2.1.1). | |||
Add instance discovery filter script: | |||
snmp = CreateSNMPTransport($node); | |||
ifName = SNMPGetValue(snmp,".1.3.6.1.2.1.2.2.1.2." . $1); | |||
return %((ifType==6), $1, ifName); | |||
== Node interface == | == Node interface == |
edits