Page 4 of 5
Re: (Return code of 127 is out of bounds - plugin may be mis
Posted: Fri Nov 15, 2019 1:52 pm
by kmartin2007
THat is the check_url
define command {
command_name check_url
command_line $USER1$/check_url.pl $ARG1$
}
define service {
use production-service
host_name AWSSRVPRDIIS01
service_description ESPDATA.ORG.AU
check_command check_url!
http://www.espdata.org.au/index.asp
}
Re: (Return code of 127 is out of bounds - plugin may be mis
Posted: Fri Nov 15, 2019 1:57 pm
by scottwilkerson
Ok, lets run the following and post the output
Code: Select all
su nagios -c '/usr/local/nagios/libexec/check_url.pl http://www.espdata.org.au/index.asp; echo $?'
Re: (Return code of 127 is out of bounds - plugin may be mis
Posted: Fri Nov 15, 2019 1:59 pm
by kmartin2007
root@dalsrvitmon03:/usr/local/nagios/libexec# su nagios -c '/usr/local/nagios/libexec/check_url.pl
http://www.espdata.org.au/index.asp; echo $?'
This account is currently not available.
hmmm i think i know what this is, but not 100%. maybe we dont have an account configured on the local server maybe?
Re: (Return code of 127 is out of bounds - plugin may be mis
Posted: Fri Nov 15, 2019 2:04 pm
by scottwilkerson
Something is wrong with the nagios user account
can you just su to the account?
is it expired?
Re: (Return code of 127 is out of bounds - plugin may be mis
Posted: Fri Nov 15, 2019 2:10 pm
by kmartin2007
scottwilkerson wrote:Something is wrong with the nagios user account
can you just su to the account?
is it expired?
I dont remember ever setting this password when using apt install to install nagios3 core
ozadmin@dalsrvitmon03:~$ su nagios
Password:
su: Authentication failure
ozadmin@dalsrvitmon03:~$ chage -l nagios
chage: Permission denied.
ozadmin@dalsrvitmon03:~$ sudo -s
[sudo] password for ozadmin:
root@dalsrvitmon03:~# chage -l nagios
Last password change : Nov 12, 2019
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
Re: (Return code of 127 is out of bounds - plugin may be mis
Posted: Fri Nov 15, 2019 2:19 pm
by scottwilkerson
can you su nagios once you are root?
there should be no password on the nagios account unless you set one
Re: (Return code of 127 is out of bounds - plugin may be mis
Posted: Fri Nov 15, 2019 3:09 pm
by kmartin2007
scottwilkerson wrote:can you su nagios once you are root?
there should be no password on the nagios account unless you set one
root@dalsrvitmon03:~# su nagios
This account is currently not available.
Re: (Return code of 127 is out of bounds - plugin may be mis
Posted: Fri Nov 15, 2019 5:44 pm
by scottwilkerson
You may want to try to change the shell for the nagios user
Re: (Return code of 127 is out of bounds - plugin may be mis
Posted: Fri Nov 15, 2019 6:04 pm
by kmartin2007
that worked
root@dalsrvitmon03:/usr/local/nagios/libexec# su nagios
nagios@dalsrvitmon03:/usr/local/nagios/libexec$
Re: (Return code of 127 is out of bounds - plugin may be mis
Posted: Fri Nov 15, 2019 6:08 pm
by kmartin2007
Still says password is bad, no password was entered
ozadmin@dalsrvitmon03:~$ su nagios -c '/usr/local/nagios/libexec/check_url.pl
http://www.espdata.org.au/index.asp; echo $?'
Password:
su: Authentication failure
ozadmin@dalsrvitmon03:~$ su nagios -c '/usr/local/nagios/libexec/check_url.pl
http://www.espdata.org.au/index.asp; echo $?'
Password:
su: Authentication failure
ozadmin@dalsrvitmon03:~$