From 9dce7a6054a65c52acf2d5dc304e8bd89906f46d Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 29 Jul 2010 22:14:56 +0000 Subject: [PATCH] sensors auth file for graphs (no real auth yet) git-svn-id: http://www.observium.org/svn/observer/trunk@1535 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/graphs/sensor/auth.inc.php | 8 ++++++++ includes/discovery/cisco-entity-sensor.inc.php | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 html/includes/graphs/sensor/auth.inc.php diff --git a/html/includes/graphs/sensor/auth.inc.php b/html/includes/graphs/sensor/auth.inc.php new file mode 100644 index 000000000..07c6d7cb1 --- /dev/null +++ b/html/includes/graphs/sensor/auth.inc.php @@ -0,0 +1,8 @@ + diff --git a/includes/discovery/cisco-entity-sensor.inc.php b/includes/discovery/cisco-entity-sensor.inc.php index 04c0cb60e..606d6ac22 100644 --- a/includes/discovery/cisco-entity-sensor.inc.php +++ b/includes/discovery/cisco-entity-sensor.inc.php @@ -34,8 +34,10 @@ if ($device['os'] == "ios" || $device['os_group'] == "ios") { $entPhysicalIndex = $index; $descr = snmp_get($device, "entPhysicalName.".$index, "-Oqv", "ENTITY-MIB"); + if(!$descr) { snmp_get($device, "entPhysicalDescr.".$index, "-Oqv", "ENTITY-MIB"); } if(is_numeric($entry['entSensorMeasuredEntity']) && $entry['entSensorMeasuredEntity']) { $measured_descr = snmp_get($device, "entPhysicalName.".$entry['entSensorMeasuredEntity'],"-Oqv", "ENTITY-MIB"); + if(!measured_descr) { $measured_descr = snmp_get($device, "entPhysicalDescr.".$entry['entSensorMeasuredEntity'],"-Oqv", "ENTITY-MIB");} $descr = $measured_descr . " - " . $descr; }