[Nagiosplug-devel] [ nagiosplug-Bugs-1985246 ] ssh_disk dont interpret -C with single quotes correct
SourceForge.net
noreply at sourceforge.net
Tue May 26 10:33:30 CEST 2009
Bugs item #1985246, was opened at 2008-06-05 05:16
Message generated for change (Comment added) made by dermoth
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985246&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Argument proccessing
Group: v1.4.14
>Status: Closed
>Resolution: Fixed
Priority: 7
Private: No
Submitted By: Jan Wagner (cyco_dd)
Assigned to: Thomas Guyot-Sionnest (dermoth)
Summary: ssh_disk dont interpret -C with single quotes correct
Initial Comment:
The following Bugreport we got against our debian package:
By default, the ssh_disk configuration has the following command line...
/usr/lib/nagios/plugins/check_by_ssh -H $HOSTADDRESS$ -C
'/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$'
This creates the following error when trying to check a remote system...
[1179694002] SERVICE ALERT: tagboard;/dev/hda1 Free
Space;UNKNOWN;SOFT;1;Could not open pipe: /usr/bin/ssh 172.24.32.1
'/usr/lib/nagios/plugins/check_disk -w 5% -c 3% -p "/dev/hda1"'
Changing the single quotes to be double quotes in the config resolves
this problem.
You can track the bugreport via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=425312
Thanks and kind regards, Jan.
----------------------------------------------------------------------
>Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-05-26 04:33
Message:
check_by_ssh now accepts any kind of quotes
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-05-26 04:33
Message:
This problem is now fixed in Git. Thank you for your report.
----------------------------------------------------------------------
Comment By: Thomas Guyot-Sionnest (dermoth)
Date: 2009-03-17 00:55
Message:
Thanks, wpreston, for the patch. It looks very nice, though I have some
questions/comments about it...
By going over ssh the remote end normally spawns a shell when it feels
it's required. Are there any possible interaction with your patch and
fancy/quirky check commands to work around them? Backwards-compatibility is
an important issue there, though I guess it wouldn't be too hard to allow
it with a conditional switch if required.
It would be very nice if you could include code comments about the new
functions.
It seems like there are bug fixes along with new features (i.e. you seem
to alter functions/unrelated parts of the code). It would be nice if you
could make separate patches for them and apply the new features on top of
the fixed code.
Any reason for strcpy'ing the arguments when you can simply pass pointers
around? This avoids the need to free them afterwards.
I wouldn't modify the process_arguments function, as we may one day write
a C library that will take care of thet (among other). Any reason **newargv
and **opts are not global like the rest?
Somewhere in np_runcmd_open_argv you have this, and I can't see these
variables anywhere else in the patch...:
+ int master,slave;
Why not using MAXARGS for detecting a full array?
C++ comments (//) break on some architectures (just FYI)
Does it apply on latest development code?
Thanks
----------------------------------------------------------------------
Comment By: Will Preston (wpreston)
Date: 2009-03-13 11:26
Message:
There's a patch 2268675 (fix for quoting in check_by_ssh) in the queue
which would fix this.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1985246&group_id=29880
More information about the Devel
mailing list