Page 1 of 1

nagios eventhandler

Posted: Thu Dec 13, 2012 2:29 pm
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

Re: nagios eventhandler

Posted: Fri Dec 14, 2012 11:26 am
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?