Nagios notification timed out with phyton and yowsup-cli
Posted: Thu Sep 10, 2015 9:29 am
Hello everybody,
I've been working trying to implement Whatsapp notification for Nagios 3.0.6 on my Suse (SUSE Linux Enterprise Server 11 (x86_64), VERSION = 11, PATCHLEVEL = 3).
Test from console is working fine and I receive the whatsapp message; using root, nagios, or nagios + sudo, with any of these lines:
/usr/bin/python /usr/local/bin/yowsup-cli demos -c /usr/local/bin/config -s 5491133334444 "NOTIFICATION.Test"
sudo /usr/bin/python /usr/local/bin/yowsup-cli demos -c /usr/local/bin/config -s 5491133334444 "NOTIFICATION.Test"
but when I configure same line on my service notification command, like this one:
command_line /usr/bin/python /usr/local/bin/yowsup-cli demos -c /usr/local/bin/config -s 5491133334444 "NOTIFICATION.Test"
I receive the timeout message (also setting timeout to 300 seconds):
[1441895110] Warning: Contact 'fpuche' service notification command '/usr/bin/python /usr/local/bin/yowsup-cli demos -c /usr/local/bin/config -s 5491133334444 "NOTIFICATION.Test"' timed out after 30 seconds
I've also tested the same with a .py python sample script, and it worked smoothly. Proxy with nagios and sudo is working properly (configured on /etc/sudoers file).
What may I have to check?
Thanks in advance for your help.
Best regards,
Fernando
I've been working trying to implement Whatsapp notification for Nagios 3.0.6 on my Suse (SUSE Linux Enterprise Server 11 (x86_64), VERSION = 11, PATCHLEVEL = 3).
Test from console is working fine and I receive the whatsapp message; using root, nagios, or nagios + sudo, with any of these lines:
/usr/bin/python /usr/local/bin/yowsup-cli demos -c /usr/local/bin/config -s 5491133334444 "NOTIFICATION.Test"
sudo /usr/bin/python /usr/local/bin/yowsup-cli demos -c /usr/local/bin/config -s 5491133334444 "NOTIFICATION.Test"
but when I configure same line on my service notification command, like this one:
command_line /usr/bin/python /usr/local/bin/yowsup-cli demos -c /usr/local/bin/config -s 5491133334444 "NOTIFICATION.Test"
I receive the timeout message (also setting timeout to 300 seconds):
[1441895110] Warning: Contact 'fpuche' service notification command '/usr/bin/python /usr/local/bin/yowsup-cli demos -c /usr/local/bin/config -s 5491133334444 "NOTIFICATION.Test"' timed out after 30 seconds
I've also tested the same with a .py python sample script, and it worked smoothly. Proxy with nagios and sudo is working properly (configured on /etc/sudoers file).
What may I have to check?
Thanks in advance for your help.
Best regards,
Fernando