Add ## for mail to sms

Marc Powell marc at ena.com
Sun Mar 15 19:48:30 CET 2009


On Mar 15, 2009, at 12:09 PM, Martyn wrote:
> 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 ##
>

One very minor edit --

/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$

becomes

/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$

You should try to understand why that was all it takes.

--
Marc

------------------------------------------------------------------------------
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
_______________________________________________
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