[Nagiosplug-help] Nagios plugins , IFS
Garrett, Matt M SITI-ITDIEEE
matt.garrett at shell.com
Wed Dec 3 09:14:01 CET 2003
Folks
Note sure if this is possible or not.
All Nagios plugins return there text with spaces in between the text fields.
Which is great to be able to read.
However my Automated logging system (Service Centre , via PEM)
Require the test to be in one line e.g have a underscore character in it
Is there are easy way to change the plugins to support different Internal Field Separators IFS
The way I have round it is to have a shell script do something like
#!/bin/ksh
# Script to just get the ssh bits we need and use IFS _ for Service Center.
SSH=`/local/nagios/libexec/check_ssh $1`
STATUS=$?
echo "$SSH " | awk '{print $2"_"$3}'
exit $STATUS
While the above works fine.
It does mean making shell scripts for each check plugin that I need to use.
Is there a better way of doing this ?
Thanks
Matt
Matthew Garrett
Unix System Support
Shell Information Technology International Limited
Seafield House, North Anderson Drive, Aberdeen AB15 6GZ, United Kingdom
Tel: +44 (0)1224 81 8373 Other Tel: Internal 630 8373
Email:
Internet: http://www.shell.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20031203/302a4a04/attachment.html>
More information about the Help
mailing list