Add ## for mail to sms
Christoph Stoettner
info at stoeps.de
Sun Mar 15 20:21:49 CET 2009
Hi,
I would add the two ## here:
[...] $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$ *##*" |
/usr/bin/mailx -s [...]
Greetz
Chris
On Sun, Mar 15, 2009 at 6:09 PM, Martyn <martyn at chetnet.co.uk> wrote:
> 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
>
>
>
>
> ------------------------------------------------------------------------------
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090315/31a0cf59/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