1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 02:51:03 +00:00

[snmp__if_combined] Reindent

This commit is contained in:
Olivier Mehani 2021-07-20 10:51:25 +10:00
parent 6ac458ace1
commit ecb1d34814

View file

@ -8,25 +8,29 @@ snmp__if_combined - SNMP card plugin to monitor the network interfaces of any ne
=head1 APPLICABLE SYSTEMS =head1 APPLICABLE SYSTEMS
Any SNMP capable networked computer equipment. Using a command such Any SNMP capable networked computer equipment. Using a command such
as "munin-node-configure --snmp switch.langfeldt.net --snmpversion 2c as
--snmpcommunity public | sh -x" should auto-detect all applicable
interfaces. On a typical switch you will get one plugin pr. ethernet munin-node-configure --snmp switch.langfeldt.net --snmpversion 2c --snmpcommunity public | sh -x
port. On a router you might get one plugin per VLAN interface.
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 per VLAN
interface.
=head2 NOTABLE DIFFERENCE WITH SNMP__IF_MULTI =head2 NOTABLE DIFFERENCE WITH SNMP__IF_MULTI
The smnp__if_multi plugin records data in _bytes_ per second, and shows The `smnp__if_multi` plugin records data in _bytes_ per second, and shows them
them as bps by using CDEFs when graphing. This plugin performs the as bps by using CDEFs when graphing. This plugin performs the multiplication
multiplication upon reporting the value, and therefore doesn't have a upon reporting the value, and therefore doesn't have a CDEF in the graphing
CDEF in the graphing path. path.
This is important when migration from snmp__if_multi, for at least two aspects: This is important when migration from `snmp__if_multi`, for at least two
aspects:
- Reusing RRDs: it is not possible to just rename the old RRD files from - Reusing RRDs: it is not possible to just rename the old RRD files from
smnp__if_multi, as historical data will be graphed as 8 times smaller than in `smnp__if_multi`, as historical data will be graphed as 8 times smaller than in
reality. The stored values would need to be adjusted. reality. The stored values would need to be adjusted.
- Data loaning: borrowing graphs no longer need to include a CDEF to convert - Data loaning: borrowing graphs no longer need to include a CDEF to convert
bytes to bits. Conversely, they do now need a CDEF to convert bits to bytes. bytes to bits. Conversely, they do now need a CDEF to convert bits to bytes.
To reflect this aspect explicitely, the root graph's totals are named To reflect this aspect explicitely, the root graph's totals are named
recv_bits and send_bits. recv_bits and send_bits.
@ -70,9 +74,9 @@ would normally be for VPNs. A minor horde of different interface types
are supposted, please see IANAifType-MIB (on your system or find with are supposted, please see IANAifType-MIB (on your system or find with
Google) for a full list. Google) for a full list.
The stackedRoot option determines whether the root summary graph shows the traffic The `stackedRoot` option determines whether the root summary graph shows the
on each interface separately, or stacks them on top of one another to show the traffic on each interface separately, or stacks them on top of one another to
total traffic through the device. show the total traffic through the device.
=head1 INTERPRETATION =head1 INTERPRETATION
@ -85,7 +89,7 @@ two additional series are calculated to show the total usage of the device.
Those series are useful for loaning into higher-level summary graphs (but see Those series are useful for loaning into higher-level summary graphs (but see
BUGS below). BUGS below).
Sub-graphs are created, one per interface, akin to snmp__if_multi Sub-graphs are created, one per interface, akin to `snmp__if_multi`
plugin. plugin.
=head1 MIB INFORMATION =head1 MIB INFORMATION
@ -126,7 +130,7 @@ Should support indexing by
When using the `stackedRoot` option, the total lines (`send_bits` and When using the `stackedRoot` option, the total lines (`send_bits` and
`recv_bits`) may sometimes jump to nonsensical values. This is a bug shared with `recv_bits`) may sometimes jump to nonsensical values. This is a bug shared with
the original snmp__if_multi. the original `snmp__if_multi`.
This seems to be due to the way those series are calculated, by summing the This seems to be due to the way those series are calculated, by summing the
current values of the other counters. The first issue is that of summing 64-bit current values of the other counters. The first issue is that of summing 64-bit
@ -496,7 +500,7 @@ my %ifTypes = (
x86Laps => 242, x86Laps => 242,
wwanPP => 243, wwanPP => 243,
wwanPP2 => 244 wwanPP2 => 244
); );
my %ifTypeByNum = map { $ifTypes{$_} => $_; } keys %ifTypes; my %ifTypeByNum = map { $ifTypes{$_} => $_; } keys %ifTypes;
@ -511,8 +515,8 @@ sub do_collect {
$snmpinfo = $session->get_hash( $snmpinfo = $session->get_hash(
-baseoid => $ifOIDBase, -baseoid => $ifOIDBase,
-cols => -cols => {
{ 2 => 'ifDescr', 2 => 'ifDescr',
# Type: See above # Type: See above
3 => 'ifType', 3 => 'ifType',
5 => 'ifSpeed', 5 => 'ifSpeed',
@ -531,8 +535,8 @@ sub do_collect {
# ifXEntry - SNMP v2 and up only - on some devices # ifXEntry - SNMP v2 and up only - on some devices
$snmpinfoX = $session->get_hash( $snmpinfoX = $session->get_hash(
-baseoid => $ifv2OIDBase, -baseoid => $ifv2OIDBase,
-cols => -cols => {
{ 6 => 'ifHCInOctets', 6 => 'ifHCInOctets',
10 => 'ifHCOutOctets', 10 => 'ifHCOutOctets',
15 => 'ifHighSpeed', 15 => 'ifHighSpeed',
18 => 'ifAlias', 18 => 'ifAlias',