mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Make various Cisco sensor descriptions start with upper case (#6891)
This commit is contained in:
committed by
Neil Lathwood
parent
1ba6381d61
commit
5d5d3816ef
@@ -16,7 +16,7 @@ if ($device['os_group'] == 'cisco') {
|
||||
$descr = str_replace('Cisco ', '', $descr);
|
||||
$descr = str_replace('Network Processing Engine', '', $descr);
|
||||
|
||||
discover_mempool($valid_mempool, $device, $index, 'cemp', $descr, '1', $entPhysicalIndex, null);
|
||||
discover_mempool($valid_mempool, $device, $index, 'cemp', ucwords($descr), '1', $entPhysicalIndex, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ if ($device['os_group'] == 'cisco' || $device['os'] == 'acsw') {
|
||||
rrd_file_rename($device, $old_name, $new_name);
|
||||
|
||||
if (!strstr($descr, 'No') && !strstr($usage, 'No') && $descr != '') {
|
||||
discover_processor($valid['processor'], $device, $usage_oid, $index, 'cpm', $descr, '1', $usage, $entPhysicalIndex, null);
|
||||
discover_processor($valid['processor'], $device, $usage_oid, $index, 'cpm', ucwords($descr), '1', $usage, $entPhysicalIndex, null);
|
||||
}
|
||||
}//end if
|
||||
}//end foreach
|
||||
|
@@ -159,7 +159,7 @@ if ($device['os_group'] == 'cisco') {
|
||||
} //end if
|
||||
|
||||
if ($ok) {
|
||||
discover_sensor($valid['sensor'], $type, $device, $oid, $index, 'cisco-entity-sensor', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entry['entSensorMeasuredEntity']);
|
||||
discover_sensor($valid['sensor'], $type, $device, $oid, $index, 'cisco-entity-sensor', ucwords($descr), $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current, 'snmp', $entPhysicalIndex, $entry['entSensorMeasuredEntity']);
|
||||
#Cisco IOS-XR : add a fake sensor to graph as dbm
|
||||
if ($type == "power" and $device['os'] == "iosxr" and (preg_match("/power (R|T)x/i", $descr) or preg_match("/(R|T)x Power/i", $descr))) {
|
||||
// convert Watts to dbm
|
||||
|
Reference in New Issue
Block a user