mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +02:00
minor cleanups + hopefully allow adding of ipv6-only hosts with fping6
git-svn-id: http://www.observium.org/svn/observer/trunk@1924 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -12,6 +12,7 @@ $config['log_file'] = $config['install_dir'] . "/observium.log";
|
||||
|
||||
$config['rrdtool'] = "/usr/bin/rrdtool";
|
||||
$config['fping'] = "/usr/bin/fping";
|
||||
$config['fping6'] = "/usr/bin/fping6";
|
||||
$config['snmpwalk'] = "/usr/bin/snmpwalk";
|
||||
$config['snmpget'] = "/usr/bin/snmpget";
|
||||
$config['snmpbulkwalk'] = "/usr/bin/snmpbulkwalk";
|
||||
|
||||
@@ -397,12 +397,18 @@ function isPingable($hostname)
|
||||
global $config;
|
||||
$status = shell_exec($config['fping'] . " $hostname");
|
||||
if (strstr($status, "alive"))
|
||||
{
|
||||
return TRUE;
|
||||
} else {
|
||||
$status = shell_exec($config['fping6'] . " $hostname");
|
||||
if (strstr($status, "alive"))
|
||||
{
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function is_odd($number)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user