From 6326bb4011fb1bc6e976276426ce4f9ef71e5ac3 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Mon, 15 Feb 2010 14:47:37 +0000 Subject: [PATCH] more adama general failures fixup git-svn-id: http://www.observium.org/svn/observer/trunk@858 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/discovery/fanspeeds.php | 2 +- includes/discovery/functions.inc.php | 2 +- includes/polling/bgpPeer.inc.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/discovery/fanspeeds.php b/includes/discovery/fanspeeds.php index 022085cc8..46954e21f 100644 --- a/includes/discovery/fanspeeds.php +++ b/includes/discovery/fanspeeds.php @@ -64,7 +64,7 @@ if ($device['os'] == "linux") $monitor = snmp_get($device, $monitor_oid, "-Oqv", "SUPERMICRO-HEALTH-MIB"); if ($monitor == 'true') { - echo discover_fan($device, $fan_oid, $index, $type, $descr, $precision, NULL, $limit, $current); + echo discover_fan($device, $fan_oid, $index, $type, $descr, $precision, $limit, NULL, $current); $fan_exists[$type][$index] = 1; } } diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index eee84122f..7123d0991 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -16,7 +16,7 @@ function discover_fan($device, $oid, $index, $type, $descr, $precision = 1, $low if($oid == $fan_entry['fan_oid'] && $descr == $fan_entry['fan_descr'] && $precision == $fan_entry['fan_precision']) { echo("."); } else { - mysql_query("UPDATE fanspeed SET `fan_descr` = '$descr', `fan_oid` = '$oid', `fan_precision` = '$precision' WHERE `device_id` = '$id' AND fan_type = '$type' AND `fan_index` = '$fan_index' "); + mysql_query("UPDATE fanspeed SET `fan_descr` = '$descr', `fan_oid` = '$oid', `fan_precision` = '$precision' WHERE `device_id` = '".$device['device_id']."' AND fan_type = '$type' AND `fan_index` = '$fan_index' "); echo("U"); } } diff --git a/includes/polling/bgpPeer.inc.php b/includes/polling/bgpPeer.inc.php index 422ed8fb6..9d42292f0 100755 --- a/includes/polling/bgpPeer.inc.php +++ b/includes/polling/bgpPeer.inc.php @@ -51,8 +51,9 @@ if ($device['os'] == "junos") $peer_cmd .= " jnxBgpM2PeerFsmEstablishedTime.0.ipv6." . $junos_v6[$peer_ip]; $peer_cmd .= " jnxBgpM2PeerInUpdatesElapsedTime.0.ipv6." . $junos_v6[$peer_ip]; $peer_cmd .= " jnxBgpM2PeerLocalAddr.0.ipv6." . $junos_v6[$peer_ip]; - $peer_data = trim(`$peer_cmd . '|grep -v "No Such Instance"'`); + $peer_cmd .= ' -M"+' . $config['install_dir'] . '/mibs/junos"|grep -v "No Such Instance"'; if ($debug) echo "\n$peer_cmd\n"; + $peer_data = trim(`$peer_cmd`); list($bgpPeerState, $bgpPeerAdminStatus, $bgpPeerInUpdates, $bgpPeerOutUpdates, $bgpPeerInTotalMessages, $bgpPeerOutTotalMessages, $bgpPeerFsmEstablishedTime, $bgpPeerInUpdateElapsedTime, $bgpLocalAddr) = explode("\n", $peer_data); if ($debug) { echo "State = $bgpPeerState - AdminStatus: $bgpPeerAdminStatus\n"; }