diff --git a/includes/discovery/sensors/cisco-entity-sensor.inc.php b/includes/discovery/sensors/cisco-entity-sensor.inc.php index 66340dedb0..79f9632d9e 100644 --- a/includes/discovery/sensors/cisco-entity-sensor.inc.php +++ b/includes/discovery/sensors/cisco-entity-sensor.inc.php @@ -52,11 +52,10 @@ if ($device['os_group'] == 'cisco') { if ($entitysensor[$entry['entSensorType']] && is_numeric($entry['entSensorValue']) && is_numeric($index)) { $entPhysicalIndex = $index; if ($entity_array[$index]['entPhysicalName'] || $device['os'] == 'iosxr') { - $descr = rewrite_entity_descr($entity_array[$index]['entPhysicalName']).' - '.rewrite_entity_descr($entity_array[$index]['entPhysicalDescr']); + $descr = rewrite_entity_descr($entity_array[$index]['entPhysicalName']); } else { - $descr = $entity_array[$index]['entPhysicalDescr']; - $descr = rewrite_entity_descr($descr); + $descr = rewrite_entity_descr($entity_array[$index]['entPhysicalDescr']); } // Set description based on measured entity if it exists diff --git a/includes/rewrites.php b/includes/rewrites.php index 37ecf5b715..e2516d5c28 100644 --- a/includes/rewrites.php +++ b/includes/rewrites.php @@ -36,6 +36,7 @@ function rewrite_entity_descr($descr) { $descr = str_replace('Centralized Forwarding Card', 'CFC', $descr); $descr = str_replace('Power Supply Module', 'PSU ', $descr); $descr = str_replace('/Voltage Sensor/', 'Voltage', $descr); + $descr = str_replace('Sensor', '', $descr); $descr = preg_replace('/^temperatures /', '', $descr); $descr = preg_replace('/^voltages /', '', $descr);