<!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.6617.79">
<TITLE>Removing space's from Macro's $SERVICEOUTPUT$</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<BR>

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

<P><FONT SIZE=2 FACE="Arial">I have a 3rd party notification application that requires the Nagios output $SERVICEOUTPUT$</FONT>

<BR><FONT SIZE=2 FACE="Arial">Not to contain any spaces in it, e.g convert the spaces to a "_" underscore character.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Is there a easy way with in Nagios to do this.</FONT>

<BR><FONT SIZE=2 FACE="Arial">Or should I write a Script to do this and then pass on the $SERVICEOUTPUT$ to the 3rd party application.</FONT>
</P>

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

<BR><FONT SIZE=2 FACE="Arial">The current notification looks like</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial"># 'notify-by-sccalert' command definition</FONT>

<BR><FONT SIZE=2 FACE="Arial">define command{</FONT>

<BR><FONT SIZE=2 FACE="Arial">        command_name    notify-by-sccalert</FONT>

<BR><FONT SIZE=2 FACE="Arial">        command_line    /local/nagios/bin/sccalert.ksh EVENT PATROL 3.2 event1 Expro-host-fault $HOSTNAME$ EUROPE.COM EF1.0  $SERVICEDESC$ $SERVICEOUTPUT$ _ $NOTIFICATIONTYPE$ $HOSTNAME$ SITI >/local/nagios/var/notify-by-sccalert 2>&1</FONT></P>

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

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

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

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

<BR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Arial">Linux / Unix IMG Support EPE</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>