summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Eble <psychotrahe@users.sourceforge.net>2007-09-23 12:26:03 (GMT)
committerMatthias Eble <psychotrahe@users.sourceforge.net>2007-09-23 12:26:03 (GMT)
commite8d6f41fadd81840aba3d408fe7778ccfd31ad95 (patch)
tree89246f7e4232d3232e39bf70d354e3599fe36258
parent2bb98ff021287c15aa1b4108b11568371cfabcbc (diff)
downloadmonitoring-plugins-e8d6f41fadd81840aba3d408fe7778ccfd31ad95.tar.gz
Added multiline output capability to check_by_ssh. Thanks to Matthias Flacke (#1769653)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1792 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--NEWS1
-rw-r--r--plugins/check_by_ssh.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 5b0981e..8b160c8 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ This file documents the major additions and syntax changes between releases.
29 - enforce a full path for the command to run 29 - enforce a full path for the command to run
30 The "negate" utility can now remap custom states 30 The "negate" utility can now remap custom states
31 Check_radius now supports radiusclient-ng 31 Check_radius now supports radiusclient-ng
32 Check_by_ssh now supports multiline output
32 33
331.4.9 4th June 2006 341.4.9 4th June 2006
34 Inclusion of contrib/check_cluster2 as check_cluster with some improvements 35 Inclusion of contrib/check_cluster2 as check_cluster with some improvements
diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c
index 46d1297..7306e74 100644
--- a/plugins/check_by_ssh.c
+++ b/plugins/check_by_ssh.c
@@ -110,7 +110,8 @@ main (int argc, char **argv)
110 * Wrap up quickly and keep the tricks below */ 110 * Wrap up quickly and keep the tricks below */
111 if(!passive) { 111 if(!passive) {
112 if (chld_out.lines > skip_stdout) 112 if (chld_out.lines > skip_stdout)
113 puts (chld_out.line[skip_stdout]); 113 for (i = skip_stdout; i < chld_out.lines; i++)
114 puts (chld_out.line[i]);
114 else 115 else
115 printf (_("%s - check_by_ssh: Remote command '%s' returned status %d\n"), 116 printf (_("%s - check_by_ssh: Remote command '%s' returned status %d\n"),
116 state_text(result), remotecmd, result); 117 state_text(result), remotecmd, result);