mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add CISCO-IF-EXTENSION port stats for IOS/IOS-XE (#10644)
* Add CISCO-IF-EXTENSION polling and graph * Added test data * Code style * Move CISCO-IF-EXTENSION-MIB to cisco mib dir * Test data? * Recollect test data again * ios-xe variant 'ports' with ports test data * Removed unnecessary test data
This commit is contained in:
committed by
Tony Murray
parent
38febff1ec
commit
7f32af4f7b
@@ -81,6 +81,20 @@ $cisco_oids = array(
|
||||
'locIfOutputQueueDrops',
|
||||
);
|
||||
|
||||
/*
|
||||
* CISCO-IF-EXTENSION MIB
|
||||
*/
|
||||
$cisco_if_extension_oids = array(
|
||||
'cieIfInRuntsErrs',
|
||||
'cieIfInGiantsErrs',
|
||||
'cieIfInFramingErrs',
|
||||
'cieIfInOverrunErrs',
|
||||
'cieIfInIgnored',
|
||||
'cieIfInAbortErrs',
|
||||
'cieIfInputQueueDrops',
|
||||
'cieIfOutputQueueDrops'
|
||||
);
|
||||
|
||||
$pagp_oids = array(
|
||||
'pagpOperationMode',
|
||||
);
|
||||
@@ -417,6 +431,16 @@ if ($device['os_group'] == 'cisco' && $device['os'] != 'asa') {
|
||||
$port_stats = snmpwalk_cache_oid($device, 'vlanTrunkPortNativeVlan', $port_stats, 'CISCO-VTP-MIB');
|
||||
}//end if
|
||||
|
||||
/*
|
||||
* Most (all) of the IOS/IOS-XE devices support CISCO-IF-EXTENSION MIB that provides
|
||||
* additional informationa bout input and output errors as seen in `show interface` output.
|
||||
*/
|
||||
if ($device['os'] == 'ios' || $device['os'] == 'iosxe') {
|
||||
foreach ($cisco_if_extension_oids as $oid) {
|
||||
$port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, 'CISCO-IF-EXTENSION-MIB');
|
||||
}
|
||||
}
|
||||
|
||||
$polled = time();
|
||||
|
||||
// End Building SNMP Cache Array
|
||||
@@ -864,7 +888,7 @@ foreach ($ports as $port) {
|
||||
// Add delta rate between current poll and last poll.
|
||||
$fields['ifInBits_rate'] = $port['stats']['ifInBits_rate'];
|
||||
$fields['ifOutBits_rate'] = $port['stats']['ifOutBits_rate'];
|
||||
|
||||
|
||||
prometheus_push($device, 'ports', rrd_array_filter($tags), $fields);
|
||||
influx_update($device, 'ports', rrd_array_filter($tags), $fields);
|
||||
graphite_update($device, 'ports|' . $ifName, $tags, $fields);
|
||||
@@ -898,6 +922,10 @@ foreach ($ports as $port) {
|
||||
if (Config::get('enable_ports_poe')) {
|
||||
include 'ports/port-poe.inc.php';
|
||||
}
|
||||
|
||||
if ($device['os'] == 'ios' || $device['os'] == 'iosxe') {
|
||||
include 'ports/cisco-if-extension.inc.php';
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($port['update'] as $key => $val_check) {
|
||||
|
Reference in New Issue
Block a user