a billion changes. **** MAKE SURE TO UPDATE DATABASE AND RUN poll-os.php AND discovery.php -h all **** This is VERY important, as a lot of things have changed! Expect missing files, and another update soon!

git-svn-id: http://www.observium.org/svn/observer/trunk@531 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-11-28 09:48:23 +00:00
parent bea6a0667f
commit 7157ec5549
72 changed files with 842 additions and 498 deletions

View File

@@ -10,8 +10,8 @@
$query_a = mysql_query("SELECT * FROM `devices`");
while($device = mysql_fetch_array($query_a)) {
if($device['status'] == 0 && $device['ignore'] == '0') { $this_alert = "1"; } elseif($device['ignore'] == '0') {
if(mysql_result(mysql_query("SELECT count(service_id) FROM services WHERE service_status = '0' AND service_host = '$device[id]'"),0)) { $this_alert = "1"; }
if(mysql_result(mysql_query("SELECT count(*) FROM interfaces WHERE `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up' AND device_id = '" . $device[device_id] . "'"),0)) { $this_alert = "1"; }
if(mysql_result(mysql_query("SELECT count(service_id) FROM services WHERE service_status = '0' AND service_host = '".$device['device_id']."'"),0)) { $this_alert = "1"; }
if(mysql_result(mysql_query("SELECT count(*) FROM interfaces WHERE `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up' AND device_id = '" . $device['device_id'] . "'"),0)) { $this_alert = "1"; }
}
if($this_alert) {
$device_alerts++;