aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2016-12-30 00:48:21 +0100
committerMarius Halden <marius.h@lden.org>2016-12-30 00:48:21 +0100
commit43eb409aaac185745a74ad6442045ee203fccf27 (patch)
tree14abcd08b782ada96c6d8104dcb1e1af6e668616
parentf2fa73d4e1d2a298097c2eb06d1d355283096d4e (diff)
downloadsitesummary-43eb409aaac185745a74ad6442045ee203fccf27.tar.gz
sitesummary-43eb409aaac185745a74ad6442045ee203fccf27.tar.bz2
sitesummary-43eb409aaac185745a74ad6442045ee203fccf27.tar.xz
check_by_ssh, not check_ssh, and only add -a when using check_nrpe
-rwxr-xr-xsitesummary-nodes5
1 files changed, 3 insertions, 2 deletions
diff --git a/sitesummary-nodes b/sitesummary-nodes
index 1f91226..2431680 100755
--- a/sitesummary-nodes
+++ b/sitesummary-nodes
@@ -201,14 +201,15 @@ sub print_nagios_service_check {
my $cmd;
if ($remote) {
if (is_ssh_host($hostname)) {
- $cmd = "check_ssh!$check";
+ $cmd = "check_by_ssh!$check";
} else {
$cmd = "check_nrpe!$check";
}
if (defined $check_args) {
+ $cmd .= " -a" if (!is_ssh_host($hostname));
$check_args =~ s/!/ /g;
- $cmd .= " -a $check_args";
+ $cmd .= " $check_args";
}
} else {
$cmd = "$check";