<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6396.0">
<TITLE>Nagios plugins , IFS</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Folks</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Note sure if this is possible or not.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">All Nagios plugins return there text with spaces in between the text fields.</FONT>

<BR><FONT SIZE=2 FACE="Arial">Which is great to be able to read.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">However my Automated logging system (Service Centre , via PEM)</FONT>

<BR><FONT SIZE=2 FACE="Arial">Require the test to be in one line e.g have a underscore character in it</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Is there are easy way to change the plugins to support different Internal Field Separators IFS</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">The way I have round it is to have a shell script do something like</FONT>

<BR><FONT SIZE=2 FACE="Arial">#!/bin/ksh</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial"># Script to just get the ssh bits we need and use IFS _ for Service Center.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">SSH=`/local/nagios/libexec/check_ssh $1`</FONT>

<BR><FONT SIZE=2 FACE="Arial">STATUS=$?</FONT>

<BR><FONT SIZE=2 FACE="Arial">echo "$SSH " | awk '{print $2"_"$3}'</FONT>

<BR><FONT SIZE=2 FACE="Arial">exit $STATUS</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">While the above works fine.</FONT>

<BR><FONT SIZE=2 FACE="Arial">It does mean making shell scripts for each check plugin that I need to use.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Is there a better way of doing this ?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Thanks</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Matt</FONT>
</P>
<BR>

<P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Matthew Garrett</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Unix System Support</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Shell Information Technology International Limited</FONT></SPAN>

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Seafield House, North Anderson Drive, Aberdeen AB15 6GZ, United Kingdom</FONT></SPAN>
</P>

<P><SPAN LANG="en-us"><B><FONT SIZE=2 FACE="Arial">Tel:</FONT></B> <FONT SIZE=2 FACE="Arial">+44 (0)1224 81 8373</FONT><B><FONT SIZE=2 FACE="Arial"> Other Tel:</FONT></B> <FONT SIZE=2 FACE="Arial">Internal 630 8373</FONT></SPAN>

<BR><SPAN LANG="en-us"><B><FONT SIZE=2 FACE="Arial">Email:</FONT></B> </SPAN>

<BR><SPAN LANG="en-us"><B><FONT SIZE=2 FACE="Arial">Internet:</FONT></B> <FONT SIZE=2 FACE="Arial"><A HREF="http://www.shell.com">http://www.shell.com</A></FONT></SPAN>
</P>

</BODY>
</HTML>