Page 2 of 2

Re: How to call Python script within Nagios check

Posted: Wed Aug 28, 2019 2:14 am
by jankogaga
With
su - nagios
/usr/bin/env python3 /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

Code: Select all

/usr/bin/env: python3: No such file or directory

Re: How to call Python script within Nagios check

Posted: Wed Aug 28, 2019 9:59 am
by mbellerue
Looks like Python isn't in the nagios user's path. So you will either want to update the path, or change the shebang to point directly to python3.

Re: How to call Python script within Nagios check

Posted: Thu Aug 29, 2019 9:18 am
by jankogaga
Thank you very much!
That has fixed the issue.

Re: How to call Python script within Nagios check

Posted: Thu Aug 29, 2019 10:16 am
by mbellerue
Excellent, glad to hear it's working! I will close the thread.