|
@@ -27,6 +27,7 @@
|
|
|
|
|
|
include_once '../db.inc.php';
|
|
|
include_once 'swreg.inc.php';
|
|
|
+require_once '../functions.php';
|
|
|
require_once 'Log.php';
|
|
|
|
|
|
$dsn = "$db_driver:host=$db_host;dbname=$db_name";
|
|
@@ -70,9 +71,11 @@ while ($sth !== null && $row = $sth->fetch()) {
|
|
|
exec("$FPING -q -C 1 {$row['ip_address']} 2>/dev/null", $output, $result);
|
|
|
if ($result == 0) {
|
|
|
$status = REACHABILITY_REACHABLE;
|
|
|
+ call_hook("PINGER:REACHABLE", array($row['serial_number'], $row['ip_address']));
|
|
|
} else {
|
|
|
if ($row['status'] == REACHABILITY_REACHABLE || $row['status'] == REACHABILITY_NOW_UNREACHABLE) {
|
|
|
$status = REACHABILITY_NOW_UNREACHABLE;
|
|
|
+ call_hook("PINGER:UNREACHABLE", array($row['serial_number'], $row['ip_address']));
|
|
|
}
|
|
|
}
|
|
|
|