I have an script which run in nagios server (localhost).
The script run a ssh command and all working in CLI.
When I run the script via XI GUI I get a different result.
I thought that because the SSH key was for other user and I changed it to nagios user but still the same).
SSH from localhost to the server is working.
I have scripts which run the same thing (ssh command via script) but they were configured in old version of NagiosXI (4.X).
NagiosXI version 5.5.8
I upgrade the version 3 weeks ago and it’s the first time I’m having trouble adding new monitor in localhost.
This is the configuration in the server:
Script:
Nrpe.cfg:-rwxr-xr-x 1 root nagios 1077 Feb 5 18:51 check_test_status.py
sudoers:dont_blame_nrpe=1
command[check_test_status]=sudo -S /usr/local/nagios/libexec/check_test_status.py $ARG1$ $ARG2$
respond from CLInagios ALL=NOPASSWD:/usr/local/nagios/libexec/check_test_status.py
Respond from XI:/usr/local/nagios/libexec/check_test_status.py 10.10.10.10 test
OK: no errors
(its a part of the script ro check if ssh is working).[[email protected] ~]$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -t 120 -2 -c check_test_status -a 10.10.10.10 test
check ssh connection to server