I would like to call Python script within Nagios check.
Python script has the arguments. E.g.:
/usr/local/nagios/libexec/check_ssl.py -H google.com -c E+,E,E-,F+,F,F-,T,M,C+,C-,C,D+,D,D- -d 15
and it works when I run in command line for nagios user.
What I have tried and it didn't work for me:
in commands.cfg:
Code: Select all
define command{
command_name check_ssl
command_line /usr/local/nagios/libexec/check_ssl.py -H $ARG1$ -c $ARG2$ -d $ARG3$
}
Code: Select all
define service{
use local-service ; Name of service template to use
host_name xxx
service_description SSLLABS Web service
check_command check_ssl!google.com!E+,E,E-,F+,F,F-,T,M,C+,C-,C,D+,D,D-!15
notifications_enabled 1
}
Dragan