more adama general failures fixup

git-svn-id: http://www.observium.org/svn/observer/trunk@858 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-02-15 14:47:37 +00:00
parent 0fde06f833
commit 6326bb4011
3 changed files with 4 additions and 3 deletions

View File

@@ -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;
}
}

View File

@@ -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");
}
}

View File

@@ -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"; }