Plugin:SNMP/Config

From collectd Wiki
Jump to: navigation, search

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.


  Type "if_octets"
  Table true
  Instance "IF-MIB::ifDescr"
  Values "IF-MIB::ifInOctets" "IF-MIB::ifOutOctets"


  Type "if_packets"
  Table true
  Instance "IF-MIB::ifDescr"
  Values "IF-MIB::ifInUcastPkts" "IF-MIB::ifOutUcastPkts"


  Type "if_errors"
  Table true
  Instance "IF-MIB::ifDescr"
  Values "IF-MIB::ifInErrors" "IF-MIB::ifOutErrors"

64bit counters

These configurations use ifName from ifXTable as type instance.


  Type "if_octets"
  Table true
  Instance "IF-MIB::ifName"
  Values "IF-MIB::ifHCInOctets" "IF-MIB::ifHCOutOctets"


  Type "if_packets"
  Table true
  Instance "IF-MIB::ifName"
  Values "IF-MIB::ifHCInUcastPkts" "IF-MIB::ifHCOutUcastPkts"


  Type "if_errors"
  Table true
  Instance "IF-MIB::ifName"
  Values "IF-MIB::ifHCInErrors" "IF-MIB::ifHCOutErrors"

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


  Type "timeleft"
  Table false
  Instance "battery"
  Values ".1.3.6.1.2.1.33.1.2.3.0"


  Type "percent"
  Table false
  Instance "charge-battery"
  Values ".1.3.6.1.2.1.33.1.2.4.0"


  Type "voltage"
  Table false
  Instance "battery"
  Values ".1.3.6.1.2.1.33.1.2.5.0"
  Scale 0.1


  Type "current"
  Table false
  Instance "battery"
  Values ".1.3.6.1.2.1.33.1.2.6.0"
  Scale 0.1


  Type "temperature"
  Table false
  Instance "battery"
  Values ".1.3.6.1.2.1.33.1.2.7.0"

Input


  Type "frequency"
  Table true
  InstancePrefix "input"
  Values ".1.3.6.1.2.1.33.1.3.3.1.2"
  Scale 0.1


  Type "voltage"
  Table true
  InstancePrefix "input"
  Values ".1.3.6.1.2.1.33.1.3.3.1.3"


  Type "current"
  Table true
  InstancePrefix "input"
  Values ".1.3.6.1.2.1.33.1.3.3.1.4"
  Scale 0.1


  Type "power"
  Table true
  InstancePrefix "input"
  Values ".1.3.6.1.2.1.33.1.3.3.1.5"

Output


  Type "frequency"
  Table false
  Instance "output"
  Values ".1.3.6.1.2.1.33.1.4.2.0"
  Scale 0.1


  Type "voltage"
  Table true
  InstancePrefix "output"
  Values ".1.3.6.1.2.1.33.1.4.4.1.2"


  Type "current"
  Table true
  InstancePrefix "output"
  Values ".1.3.6.1.2.1.33.1.4.4.1.3"
  Scale 0.1


  Type "power"
  Table true
  InstancePrefix "output"
  Values ".1.3.6.1.2.1.33.1.4.4.1.4"


  Type "percent"
  Table true
  InstancePrefix "load-output"
  Values ".1.3.6.1.2.1.33.1.4.4.1.5"

Bypass


  Type "frequency"
  Table false
  Instance "output"
  Values ".1.3.6.1.2.1.33.1.5.1.0"
  Scale 0.1


  Type "voltage"
  Table true
  InstancePrefix "bypass"
  Values ".1.3.6.1.2.1.33.1.5.3.1.2"


  Type "current"
  Table true
  InstancePrefix "bypass"
  Values ".1.3.6.1.2.1.33.1.5.3.1.3"
  Scale 0.1


  Type "power"
  Table true
  InstancePrefix "bypass"
  Values ".1.3.6.1.2.1.33.1.5.3.1.4"

Work-arounds

Unfortunately not all vendors interpret the UPS-MIB correctly. The following are special definitions for handling common mistakes in broken UPSes.


  Type "voltage"
  Table false
  Instance "battery"
  Values ".1.3.6.1.2.1.33.1.2.5.0"


  Type "current"
  Table true
  InstancePrefix "input"
  Values ".1.3.6.1.2.1.33.1.3.3.1.4"


  Type "current"
  Table true
  InstancePrefix "output"
  Values ".1.3.6.1.2.1.33.1.4.4.1.3"

NetApp

→ See: NetApp plugin

Information about storage systems by NetApp, Inc..


  Type "cpu"
  Table false
  Instance "system"
  Values ".1.3.6.1.4.1.789.1.2.1.2.0"


  Type "cpu"
  Table false
  Instance "idle"
  Values ".1.3.6.1.4.1.789.1.2.1.4.0"


  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"

MikroTik RouterOS

→ See: RouterOS plugin

Information about devices running RouterOS by MikroTik.


  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"



  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"



  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"


# Wireless statistics: AP mode / registration table

  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"



  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"



  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"



  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"


# Wireless statistics: AP mode / registration table

  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"

See also