snmp__if_multi - SNMP card plugin to monitor the network interfaces of any networked equipment.
Any SNMP capable networked computer equipment. Using a command such as "munin-node-configure --snmp switch.langfeldt.net --snmpversion 2c --snmpcommunity public | sh -x" should auto-detect all applicable interfaces. On a typical switch you will get one plugin pr. ethernet port. On a router you might get one plugin pr. VLAN interface.
As a rule SNMP plugins need site specific configuration. The default configuration (shown here) will only work on insecure sites/devices:
[snmp_*] env.version 2 env.community public env.ifTypeOnly ethernetCsmacd
In general SNMP is not very secure at all unless you use SNMP version 3 which supports authentication and privacy (encryption). But in any case the community string for your devices should not be "public".
Please see 'perldoc Munin::Plugin::SNMP' for further configuration information.
The ifTypeOnly is a space separated list of media types to show. By default the plugin shows only interfaces identified as 'ethernetCsmacd'. To see what interface types your switch, router, or other net thing uses you can use this command:
snmpwalk -c public -v 2c switch 126.96.36.199.188.8.131.52.1.3
It may show something like this:
IF-MIB::ifType.1 = INTEGER: ethernetCsmacd(6) IF-MIB::ifType.4 = INTEGER: mplsTunnel(150) IF-MIB::ifType.5 = INTEGER: other(1) IF-MIB::ifType.6 = INTEGER: softwareLoopback(24) IF-MIB::ifType.8 = INTEGER: tunnel(131) IF-MIB::ifType.13 = INTEGER: propVirtual(53) IF-MIB::ifType.123 = INTEGER: l2vlan(135)
propVirtual or l2vlan is usualy used for VLAN interfaces. Tunnel would normaly be for VPNs. A minor horde of different interface types are supposted, please see IANAifType-MIB (on your system or find with Google) for a full list.
The graph shows a stright forward "bits per second" incomming and outgoing thruput. "Incomming" is towards the monitored device.
Note: The internal representation of the speeds is in bytes pr. second. The plugin multiplies everyting by 8 to get bits pr. second.
This plugin requires the IF-MIB the standard IETF MIB for network interfaces.
It reports the contents of the IF-MIB::ifHCInOctets/IF-MIB::ifHCOutOctets if available, IF-MIB::ifInOctets/IF-MIB::ifOutOctets if not. The former are 64 bit counters only available with SNMP 2 and later. The later are 32 bit counters (see FEATURES below).
For errors it reports ifInErrors + ifINDiscards and ifOutErrors + ifOutDiscards.
#%# family=snmpauto #%# capabilities=snmpconf
$Id: snmp__if_.in 1818 2009-01-03 19:29:30Z janl $
Should support indexing by
- ifIndex - ifName - ifDescr - ifAlias - mac-address
(and anything else MRTG can index by) in addition to OID-index as now.
Pulling in a user definable set of ifName/ifDescr/ifAlias for textual description and even graph_title would also be nice.
If we get a patch to support the .oldname attribute then we may use that to let the operator change the indexing dynamicaly without data loss.
You may get strange results if you use SNMPv1, or SNMPv2 on switches that do not support 64 bit byte counters. If the interface traffic exceeds about 50Mbps a 32 bit byte counter will wrap around in less than 5 minutes making the graph for the interface show random results.
If you have a switch/device that supports 64 bit byte counters this plugin will use them and the graph will be fine. The graph information will inform about this. You must use SNMPv2c or SNMPv3 to be able to use 64 bit counters - if the device supports them.
This problem is a feature of the device SNMP implementation or your usage of it, it is nothing the plugin can fix. In the future Munin may be able to run the plugin more often than the counter wraps around.
Copyright (C) 2004-2010 Jimmy Olsen, Dagfinn Ilmari Mannsaaker, Nicolai Langfeldt, Redpill Linpro AS and others.
Original snmp__if_ plugin: Copyright (C) 2004-2009 Jimmy Olsen, Dagfinn Ilmari Mannsaaker.
Initial SNMPv3 support by "Confusedhacker".
Documentation, porting to Munin::Plugin::SNMP and further grooming by Nicolai Langfeldt.
Reworked to snmp__if_multi by Nicolai Langfeldt.