mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
- Ensure that $check_cmd is always set.
- Move SQL because of upstream changes
This commit is contained in:
@@ -112,6 +112,7 @@ function poll_service($service) {
|
||||
global $config;
|
||||
$update = array();
|
||||
$old_status = $service['service_status'];
|
||||
$check_cmd = "";
|
||||
|
||||
// if we have a script for this check, use it.
|
||||
$check_script = $config['install_dir'].'/includes/services/check_'.strtolower($service['service_type']).'.inc.php';
|
||||
@@ -120,7 +121,7 @@ function poll_service($service) {
|
||||
}
|
||||
|
||||
// If we do not have a cmd from the check script, build one.
|
||||
if (!isset($check_cmd)) {
|
||||
if ($check_cmd == "") {
|
||||
$check_cmd = $config['nagios_plugins'] . "/check_" . $service['service_type'] . " -H " . ($service['service_ip'] ? $service['service_ip'] : $service['hostname']);
|
||||
$check_cmd .= " " . $service['service_param'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user