Title: Removing space's from Macro's $SERVICEOUTPUT$

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

Reply via email to