From a688944816721832893a94d804e8717f791528be Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Thu, 7 Jan 2010 17:48:41 +0000 Subject: [PATCH] Ignore failed temperature readings, though they will probably still be inserted as 0 degrees git-svn-id: http://www.observium.org/svn/observer/trunk@612 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/polling/temperatures.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/polling/temperatures.inc.php b/includes/polling/temperatures.inc.php index 207fee231..ac149415b 100755 --- a/includes/polling/temperatures.inc.php +++ b/includes/polling/temperatures.inc.php @@ -4,7 +4,7 @@ $query = "SELECT * FROM temperature WHERE temp_host = '" . $device['device_id'] $temp_data = mysql_query($query); while($temperature = mysql_fetch_array($temp_data)) { - $temp_cmd = $config['snmpget'] . " -m SNMPv2-MIB -O Uqnv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " " . $temperature['temp_oid']; + $temp_cmd = $config['snmpget'] . " -m SNMPv2-MIB -O Uqnv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " " . $temperature['temp_oid'] . "|grep -v \"No Such Instance\""; $temp = shell_exec($temp_cmd); echo("Checking temp " . $temperature['temp_descr'] . "... ");