mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
woo
git-svn-id: http://www.observium.org/svn/observer/trunk@85 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -9,6 +9,7 @@ while ($device = mysql_fetch_array($device_query)) {
|
||||
|
||||
unset($update); unset($update_query); unset($seperator); unset($version); unset($uptime); unset($features);
|
||||
unset($location); unset($hardware);
|
||||
|
||||
$pingable = isPingable($device['hostname']);
|
||||
$snmpable = FALSE;
|
||||
|
||||
@@ -16,7 +17,7 @@ while ($device = mysql_fetch_array($device_query)) {
|
||||
$snmpable = isSNMPable($device['hostname'], $device['community'], $device['snmpver']);
|
||||
}
|
||||
|
||||
if ($pingable !== FALSE && $snmpable !== FALSE ) {
|
||||
if ($pingable && $snmpable) {
|
||||
$status = '1';
|
||||
if($device['os'] == "FreeBSD" || $device['os'] == "OpenBSD" || $device['os'] == "Linux" || $device['os'] == "Windows") {
|
||||
$uptimeoid = ".1.3.6.1.2.1.25.1.1.0";
|
||||
|
@@ -21,12 +21,16 @@ while ($device = mysql_fetch_array($device_query)) {
|
||||
$status = `$fping $hostname | cut -d " " -f 3`;
|
||||
$status = trim($status);
|
||||
|
||||
if($status == "alive") {
|
||||
if(strstr($status, "alive")) {
|
||||
$pos = `snmpget -$snmpver -c $community -t 1 $hostname sysDescr.0`;
|
||||
# echo("pos - $pos/n");
|
||||
if($pos == '') {
|
||||
$status='0';
|
||||
$posb = `snmpget -$snmpver -c $community -t 1 $hostname 1.3.6.1.2.1.7526.2.4`;
|
||||
if($posb == '') { } else { $status='1'; }
|
||||
if($posb == '') { } else {
|
||||
$status='1';
|
||||
# echo("posb - $posb/n");
|
||||
}
|
||||
} else {
|
||||
$status='1';
|
||||
}
|
||||
|
Reference in New Issue
Block a user