running an external script for sms notification

Manish Kumar manikumar85 at gmail.com
Thu Sep 15 19:17:22 CEST 2011


Hi what I am interested in is what your sendsms script contains are u using
email-to-sms gateway or some external hardware sms gateway or some linux
utility like send-sms tools to achieve the same.

On Thu, Sep 15, 2011 at 9:54 PM, Jim Avery <jim at jimavery.me.uk> wrote:

> On 15 September 2011 10:35, Metron 6 (six) <metron6 at gmail.com> wrote:
> > hello all,
> >
> > i have a shell script which takes two arguments, the mobile phone
> > number and the text message, which sends sms notifications.
> > for example /usr/local/bin/sendsms 6944444444 "host problem"
> >
> > when i debug Nagios, i can see this into the log file
> >
> > [1316012199.774170] [256.1] [pid=17625] Running command
> > '/usr/lib/nagios/plugins/sendsms 6944420xxx "Type:PROBLEM, Host:
> > 00-dummy_2, State: DOWN, Address: 194.145.127.44, Info: Unknown ping
> > number, Date/Time: 14-09-2011"'...
> >
> > when i run from a terminal the command
> > /usr/lib/nagios/plugins/sendsms 6944420xxx "Type:PROBLEM, Host:
> > 00-dummy_2, State: DOWN, Address: 194.145.127.44, Info: Unknown ping
> > number, Date/Time: 14-09-2011"
> > sms message arrives normally....
> >
> > this is how i include the command into nagios conf files..
> >
> > define command{
> >       command_name                    host-notify-by-sms
> >       command_line                    /usr/lib/nagios/plugins/sendsms
> > $CONTACTPAGER$ "Type:$NOTIFICATIONTYPE$, Host: $HOSTNAME$, State:
> > $HOSTSTATE$, Address: $HOSTADDRESS$, Info: $HOSTOUTPUT$, Date/Time:
> > $DATE$"
> > }
> >
> > any help/suggestions ?
>
> Looks ok to me.  Am I right in assuming that when Nagios runs the
> command you receive no SMS at all?  Or do you receive something but in
> the wrong format?
>
> When you run the command from the command-line, are you logged in as
> 'nagios'?  If not it could be a simple permissions problem.
>
>
> ------------------------------------------------------------------------------
> Doing More with Less: The Next Generation Virtual Desktop
> What are the key obstacles that have prevented many mid-market businesses
> from deploying virtual desktops?   How do next-generation virtual desktops
> provide companies an easier-to-deploy, easier-to-manage and more affordable
> virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
> _______________________________________________
> 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
>



-- 
Thanks
Manish Kumar
http://in.linkedin.com/in/manishkumar85
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110915/4a90bd47/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
-------------- 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