Add ## for mail to sms

Martyn martyn at chetnet.co.uk
Sun Mar 15 18:09:50 CET 2009


I'm a little nervous about asking my question but I have to because I have
no knowledge about coding and I have searched on Google, not sure what to
search for is also hampering me.

I need to get two gates at the end of this script so my provider will then
send it on to their SMS gateway .


/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type:
$NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mailx -s
"** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$
**" $CONTACTEMAIL$

So to get my mail to SMS should look like the below, my provider will send
it to SMS and remove the two #'s.

***** Nagios *****

Notification Type: PROBLEM

Service: FTP
Host: IBM 3
Address: xxx.xxx.xxx.xxx
State: CRITICAL

Date/Time: Fri Mar 13 18:12:47 GMT 2009

Additional Info:

Connection refused ##

Thanks

Martyn



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090315/e91a171f/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list