nagios eventhandler

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
sri25
Posts: 1
Joined: Thu Dec 13, 2012 2:25 pm

nagios eventhandler

Post by sri25 »

my case statement in shell looks like below
case "$1" in
OK)
case "$2" in

SOFT)
case "$3" in
1)
printf testing | /usr/lib64/nagios/plugins/eventhandlers/sms.py --topic=arn:aws:sns:us-east-1:12334323:xxxx-test --sub="testing"


nagios stripping printf "testing" and running python sms.py --topic=arn:aws:sns:us-east-1:12334323:xxxx-test --sub="test" and hanging with no result. If I run printf testing | /usr/lib64/nagios/plugins/eventhandlers/sms.py --topic=arn:aws:sns:us-east-1:12334323:xxxx-test --sub="testing" command manually it works fine. I want nagios to run whole command instead of stripping "printf testing |". Thanks for help in advance
Last edited by sri25 on Fri Dec 14, 2012 1:22 pm, edited 1 time in total.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: nagios eventhandler

Post by slansing »

Are you sure that the Nagios user can execute:

Code: Select all

/usr/lib64/nagios/plugins/eventhandlers/sms_notify.py
Also the two scripts you listed are different, sms_notify.py and sms.py. Was this a typo?
Locked