running an external script for sms notification
Metron 6 (six)
metron6 at gmail.com
Wed Sep 21 14:23:52 CEST 2011
we have an account in a bulk-sms server, and i'm using curl to call a
page, and send the sms..
anyway, it was a permissions problem, the script couldnt write to the log file..
On Thu, Sep 15, 2011 at 8:17 PM, Manish Kumar <manikumar85 at gmail.com> wrote:
> 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
>
> ------------------------------------------------------------------------------
> 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
>
--
regards,
Metron 6 (six)
Metron6 at gmail.com
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
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