mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
fix temperatures
git-svn-id: http://www.observium.org/svn/observer/trunk@2237 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -147,6 +147,8 @@ function check_valid_sensors($device, $class, $valid)
|
||||
{
|
||||
while ($test = mysql_fetch_assoc($query))
|
||||
{
|
||||
|
||||
print_r($test);
|
||||
$index = $test['sensor_index'];
|
||||
$type = $test['sensor_type'];
|
||||
if ($debug) { echo($index . " -> " . $type . "\n"); }
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
global $entity_temperature;
|
||||
|
||||
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = '".$device['device_id']."' AND `sensor_class` = 'temperature' AND (`sensor_type` = 'cisco-entity-sensor' OR `sensor_type` = 'entity-sensor')"),0) == "0" && ($device['os'] == "ios" || $device['os_group'] == "ios"))
|
||||
@@ -27,9 +26,10 @@ if (mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` =
|
||||
$descr = trim($descr);
|
||||
|
||||
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'cisco', $descr, '1', '1', NULL, NULL, NULL, NULL, $temperature);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user