Plugin SNMP Config
Clone this wiki locally
This page contains some example configurations for the SNMP plugin. This page is meant as a cookbook, so if you have a configuration for an aspect not handled here or a daemon not present, please feel free to add anything that's useful for you.
These definitions are also available in the source code distribution as contrib/snmp-data.conf.
Interfaces (IF-MIB)
Interface statistics using the IF-MIB, as described in RFC 2863. Versions for 32bit counters (ifTable table) and 64bit counters (ifXTable) are present.
32bit counters
These configurations use ifDescr from ifTable as type instance.
<Data "ifmib_if_octets32">
Type "if_octets"
Table true
Instance "IF-MIB::ifDescr"
Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets"
</Data>
<Data "ifmib_if_packets32">
Type "if_packets"
Table true
Instance "IF-MIB::ifDescr"
Values "IF-MIB::ifInUcastPkts" "IF-MIB::ifOutUcastPkts"
</Data>
<Data "ifmib_if_errors32">
Type "if_errors"
Table true
Instance "IF-MIB::ifDescr"
Values "IF-MIB::ifInErrors" "IF-MIB::ifOutErrors"
</Data>
64bit counters
These configurations use ifName from ifXTable as type instance.
<Data "ifmib_if_octets64">
Type "if_octets"
Table true
Instance "IF-MIB::ifName"
Values "IF-MIB::ifHCInOctets" "IF-MIB::ifHCOutOctets"
</Data>
<Data "ifmib_if_packets64">
Type "if_packets"
Table true
Instance "IF-MIB::ifName"
Values "IF-MIB::ifHCInUcastPkts" "IF-MIB::ifHCOutUcastPkts"
</Data>
<Data "ifmib_if_errors64">
Type "if_errors"
Table true
Instance "IF-MIB::ifName"
Values "IF-MIB::ifHCInErrors" "IF-MIB::ifHCOutErrors"
</Data>
Uninterruptible power supplies (UPS-MIB)
The following definitions query information about Uninterruptible power supplies (UPSes). The information is described in the UPS-MIB from RFC 1628.
Battery
<Data "upsmib_timeleft_battery">
Type "timeleft"
Table false
Instance "battery"
Values ".1.3.6.1.2.1.33.1.2.3.0"
</Data>
<Data "upsmib_charge_battery">
Type "percent"
Table false
Instance "charge-battery"
Values ".1.3.6.1.2.1.33.1.2.4.0"
</Data>
<Data "upsmib_voltage_battery">
Type "voltage"
Table false
Instance "battery"
Values ".1.3.6.1.2.1.33.1.2.5.0"
Scale 0.1
</Data>
<Data "upsmib_current_battery">
Type "current"
Table false
Instance "battery"
Values ".1.3.6.1.2.1.33.1.2.6.0"
Scale 0.1
</Data>
<Data "upsmib_temperature_battery">
Type "temperature"
Table false
Instance "battery"
Values ".1.3.6.1.2.1.33.1.2.7.0"
</Data>
Input
<Data "upsmib_frequency_input">
Type "frequency"
Table true
InstancePrefix "input"
Values ".1.3.6.1.2.1.33.1.3.3.1.2"
Scale 0.1
</Data>
<Data "upsmib_voltage_input">
Type "voltage"
Table true
InstancePrefix "input"
Values ".1.3.6.1.2.1.33.1.3.3.1.3"
</Data>
<Data "upsmib_current_input">
Type "current"
Table true
InstancePrefix "input"
Values ".1.3.6.1.2.1.33.1.3.3.1.4"
Scale 0.1
</Data>
<Data "upsmib_power_input">
Type "power"
Table true
InstancePrefix "input"
Values ".1.3.6.1.2.1.33.1.3.3.1.5"
</Data>
Output
<Data "upsmib_frequency_output">
Type "frequency"
Table false
Instance "output"
Values ".1.3.6.1.2.1.33.1.4.2.0"
Scale 0.1
</Data>
<Data "upsmib_voltage_output">
Type "voltage"
Table true
InstancePrefix "output"
Values ".1.3.6.1.2.1.33.1.4.4.1.2"
</Data>
<Data "upsmib_current_output">
Type "current"
Table true
InstancePrefix "output"
Values ".1.3.6.1.2.1.33.1.4.4.1.3"
Scale 0.1
</Data>
<Data "upsmib_power_output">
Type "power"
Table true
InstancePrefix "output"
Values ".1.3.6.1.2.1.33.1.4.4.1.4"
</Data>
<Data "upsmib_load_output">
Type "percent"
Table true
InstancePrefix "load-output"
Values ".1.3.6.1.2.1.33.1.4.4.1.5"
</Data>
Bypass
<Data "upsmib_frequency_bypass">
Type "frequency"
Table false
Instance "output"
Values ".1.3.6.1.2.1.33.1.5.1.0"
Scale 0.1
</Data>
<Data "upsmib_voltage_bypass">
Type "voltage"
Table true
InstancePrefix "bypass"
Values ".1.3.6.1.2.1.33.1.5.3.1.2"
</Data>
<Data "upsmib_current_bypass">
Type "current"
Table true
InstancePrefix "bypass"
Values ".1.3.6.1.2.1.33.1.5.3.1.3"
Scale 0.1
</Data>
<Data "upsmib_power_bypass">
Type "power"
Table true
InstancePrefix "bypass"
Values ".1.3.6.1.2.1.33.1.5.3.1.4"
</Data>
Work-arounds
Unfortunately not all vendors interpret the UPS-MIB correctly. The following are special definitions for handling common mistakes in broken UPSes.
<Data "upsmib_voltage_battery_unscaled">
Type "voltage"
Table false
Instance "battery"
Values ".1.3.6.1.2.1.33.1.2.5.0"
</Data>
<Data "upsmib_current_input_unscaled">
Type "current"
Table true
InstancePrefix "input"
Values ".1.3.6.1.2.1.33.1.3.3.1.4"
</Data>
<Data "upsmib_current_output_unscaled">
Type "current"
Table true
InstancePrefix "output"
Values ".1.3.6.1.2.1.33.1.4.4.1.3"
</Data>
NetApp
- → See: NetApp plugin
Information about storage systems by NetApp, Inc..
<Data "netapp_cpu_system">
Type "cpu"
Table false
Instance "system"
Values ".1.3.6.1.4.1.789.1.2.1.2.0"
</Data>
<Data "netapp_cpu_idle">
Type "cpu"
Table false
Instance "idle"
Values ".1.3.6.1.4.1.789.1.2.1.4.0"
</Data>
<Data "netapp_if_octets">
Type "if_octets"
Table false
Instance "net"
Values ".1.3.6.1.4.1.789.1.2.2.12.0" ".1.3.6.1.4.1.789.1.2.2.14.0"
</Data>
MikroTik RouterOS
- → See: RouterOS plugin
Information about devices running RouterOS by MikroTik.
<Data "mikrotik_wl_sta_bitrate_tx">
tYPE "Bitrate"
Table true
InstancePrefix "st-tx-"
Instance ".1.3.6.1.4.1.14988.1.1.1.1.1.5"
Values ".1.3.6.1.4.1.14988.1.1.1.1.1.2"
</Data>
<Data "mikrotik_wl_sta_bitrate_rx">
Type "bitrate"
Table true
InstancePrefix "st-rx-"
Instance ".1.3.6.1.4.1.14988.1.1.1.1.1.5"
Values ".1.3.6.1.4.1.14988.1.1.1.1.1.3"
</Data>
<Data "mikrotik_wl_sta_signal">
Type "signal_power"
Table true
InstancePrefix "st-"
Instance ".1.3.6.1.4.1.14988.1.1.1.1.1.5"
Values ".1.3.6.1.4.1.14988.1.1.1.1.1.4"
</Data>
# Wireless statistics: AP mode / registration table
<Data "mikrotik_wl_reg_signal">
Type "signal_power"
Table true
InstancePrefix "ap-"
Instance ".1.3.6.1.4.1.14988.1.1.1.2.1.1"
Values ".1.3.6.1.4.1.14988.1.1.1.2.1.3"
</Data>
<Data "mikrotik_wl_sta_bitrate_tx">
tYPE "Bitrate"
Table true
InstancePrefix "st-tx-"
Instance ".1.3.6.1.4.1.14988.1.1.1.1.1.5"
Values ".1.3.6.1.4.1.14988.1.1.1.1.1.2"
</Data>
<Data "mikrotik_wl_sta_bitrate_rx">
Type "bitrate"
Table true
InstancePrefix "st-rx-"
Instance ".1.3.6.1.4.1.14988.1.1.1.1.1.5"
Values ".1.3.6.1.4.1.14988.1.1.1.1.1.3"
</Data>
<Data "mikrotik_wl_sta_signal">
Type "signal_power"
Table true
InstancePrefix "st-"
Instance ".1.3.6.1.4.1.14988.1.1.1.1.1.5"
Values ".1.3.6.1.4.1.14988.1.1.1.1.1.4"
</Data>
# Wireless statistics: AP mode / registration table
<Data "mikrotik_wl_reg_signal">
Type "signal_power"
Table true
InstancePrefix "ap-"
Instance ".1.3.6.1.4.1.14988.1.1.1.2.1.1"
Values ".1.3.6.1.4.1.14988.1.1.1.2.1.3"
</Data>