SF.net SVN: nagiosplug: [1792] nagiosplug/trunk

[email protected]
Newsgroups gmane.network.nagios.plugins.cvs
Message-ID <[email protected]>
Revision: 1792
          http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=1792&view=rev
Author:   psychotrahe
Date:     2007-09-23 05:26:03 -0700 (Sun, 23 Sep 2007)

Log Message:
-----------
Added multiline output capability to check_by_ssh. Thanks to Matthias Flacke (#1769653)

Modified Paths:
--------------
    nagiosplug/trunk/NEWS
    nagiosplug/trunk/plugins/check_by_ssh.c

Modified: nagiosplug/trunk/NEWS
===================================================================
--- nagiosplug/trunk/NEWS	2007-09-23 11:18:06 UTC (rev 1791)
+++ nagiosplug/trunk/NEWS	2007-09-23 12:26:03 UTC (rev 1792)
@@ -29,6 +29,7 @@
 	  - enforce a full path for the command to run
 	The "negate" utility can now remap custom states
 	Check_radius now supports radiusclient-ng
+	Check_by_ssh now supports multiline output
 
 1.4.9 4th June 2006
 	Inclusion of contrib/check_cluster2 as check_cluster with some improvements

Modified: nagiosplug/trunk/plugins/check_by_ssh.c
===================================================================
--- nagiosplug/trunk/plugins/check_by_ssh.c	2007-09-23 11:18:06 UTC (rev 1791)
+++ nagiosplug/trunk/plugins/check_by_ssh.c	2007-09-23 12:26:03 UTC (rev 1792)
@@ -110,7 +110,8 @@
 	 * Wrap up quickly and keep the tricks below */
 	if(!passive) {
 		if (chld_out.lines > skip_stdout)
-			puts (chld_out.line[skip_stdout]);
+			for (i = skip_stdout; i < chld_out.lines; i++)
+				puts (chld_out.line[i]);
 		else
 			printf (_("%s - check_by_ssh: Remote command '%s' returned status %d\n"),
 			        state_text(result), remotecmd, result);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.