From 1ce54ae8352a9470d98901306690b67271ae9a1e Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Mon, 17 Mar 2008 00:24:06 +0000 Subject: [PATCH] Fix reachability script git-svn-id: http://www.observium.org/svn/observer/trunk@167 61d68cd4-352d-0410-923a-c4978735b2b8 --- poll-reachability.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/poll-reachability.php b/poll-reachability.php index 56753ef7f9..eaee503d72 100755 --- a/poll-reachability.php +++ b/poll-reachability.php @@ -18,18 +18,16 @@ while ($device = mysql_fetch_array($device_query)) { echo("$hostname\n"); - $status = `$fping $hostname | cut -d " " -f 3`; + $status = shell_exec($config['fping'] . " $hostname | cut -d ' ' -f 3"); $status = trim($status); if(strstr($status, "alive")) { - $pos = `snmpget -$snmpver -c $community -t 1 $hostname sysDescr.0`; -# echo("pos - $pos/n"); + $pos = shell_exec($config['snmpget'] . " -$snmpver -c $community -t 1 $hostname sysDescr.0"); if($pos == '') { $status='0'; - $posb = `snmpget -$snmpver -c $community -t 1 $hostname 1.3.6.1.2.1.7526.2.4`; + $posb = shell_exec($config['snmpget'] . " -$snmpver -c $community -t 1 $hostname 1.3.6.1.2.1.7526.2.4"); if($posb == '') { } else { $status='1'; -# echo("posb - $posb/n"); } } else { $status='1';