Removing space's from Macro's $SERVICEOUTPUT$

Garrett, Matt M SITI-ITISEEEE matt.garrett at shell.com
Wed May 24 13:51:04 CEST 2006


Folks

I have a 3rd party notification application that requires the Nagios output $SERVICEOUTPUT$
Not to contain any spaces in it, e.g convert the spaces to a "_" underscore character.

Is there a easy way with in Nagios to do this.
Or should I write a Script to do this and then pass on the $SERVICEOUTPUT$ to the 3rd party application.

FYI
The current notification looks like

# 'notify-by-sccalert' command definition
define command{
        command_name    notify-by-sccalert
        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
        }

Thanks

Matt

Matthew Garrett
Linux / Unix IMG Support EPE
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-lists.org/archive/users/attachments/20060524/642c5b0f/attachment.html>


More information about the Users mailing list