fix sensors (maybe)

git-svn-id: http://www.observium.org/svn/observer/trunk@2236 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-05-04 11:04:19 +00:00
parent b3bd336515
commit a2891ea8f2
65 changed files with 172 additions and 183 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
<?php
global $valid_sensor;
echo(" ENTITY-SENSOR ");
@@ -82,7 +82,7 @@ if (is_array($oids))
if ($valid && mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = '".$device['device_id']."' AND `sensor_class` = '".$type."' AND `sensor_type` = 'cisco-entity-sensor' AND `sensor_index` = '".$index."'"),0) == "0")
## Check to make sure we've not already seen this sensor via cisco's entity sensor mib
{
discover_sensor($valid_sensor, $type, $device, $oid, $index, 'entity-sensor', $descr, $divisor, $multiplier, NULL, NULL, NULL, NULL, $current);
discover_sensor($valid['sensor'], $type, $device, $oid, $index, 'entity-sensor', $descr, $divisor, $multiplier, NULL, NULL, NULL, NULL, $current);
}
}
}