(Return code of 127 is out of bounds - plugin may be missing

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: (Return code of 127 is out of bounds - plugin may be mis

Postby kmartin2007 » Fri Nov 15, 2019 1:52 pm

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
}
kmartin2007
 
Posts: 62
Joined: Thu Nov 14, 2019 3:31 pm

Re: (Return code of 127 is out of bounds - plugin may be mis

Postby scottwilkerson » Fri Nov 15, 2019 1:57 pm

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 $?'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17023
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: (Return code of 127 is out of bounds - plugin may be mis

Postby kmartin2007 » Fri Nov 15, 2019 1:59 pm

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?
kmartin2007
 
Posts: 62
Joined: Thu Nov 14, 2019 3:31 pm

Re: (Return code of 127 is out of bounds - plugin may be mis

Postby scottwilkerson » Fri Nov 15, 2019 2:04 pm

Something is wrong with the nagios user account
can you just su to the account?
Code: Select all
su nagios


is it expired?
Code: Select all
chage -l nagios
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17023
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: (Return code of 127 is out of bounds - plugin may be mis

Postby kmartin2007 » Fri Nov 15, 2019 2:10 pm

scottwilkerson wrote:Something is wrong with the nagios user account
can you just su to the account?
Code: Select all
su nagios


is it expired?
Code: Select all
chage -l nagios



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
kmartin2007
 
Posts: 62
Joined: Thu Nov 14, 2019 3:31 pm

Re: (Return code of 127 is out of bounds - plugin may be mis

Postby scottwilkerson » Fri Nov 15, 2019 2:19 pm

can you su nagios once you are root?

Code: Select all
su nagios


there should be no password on the nagios account unless you set one
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17023
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: (Return code of 127 is out of bounds - plugin may be mis

Postby kmartin2007 » Fri Nov 15, 2019 3:09 pm

scottwilkerson wrote:can you su nagios once you are root?

Code: Select all
su nagios


there should be no password on the nagios account unless you set one





root@dalsrvitmon03:~# su nagios
This account is currently not available.
kmartin2007
 
Posts: 62
Joined: Thu Nov 14, 2019 3:31 pm

Re: (Return code of 127 is out of bounds - plugin may be mis

Postby scottwilkerson » Fri Nov 15, 2019 5:44 pm

You may want to try to change the shell for the nagios user

Code: Select all
usermod --shell /bin/bash nagios
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 17023
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: (Return code of 127 is out of bounds - plugin may be mis

Postby kmartin2007 » Fri Nov 15, 2019 6:04 pm

that worked


root@dalsrvitmon03:/usr/local/nagios/libexec# su nagios
nagios@dalsrvitmon03:/usr/local/nagios/libexec$
kmartin2007
 
Posts: 62
Joined: Thu Nov 14, 2019 3:31 pm

Re: (Return code of 127 is out of bounds - plugin may be mis

Postby kmartin2007 » Fri Nov 15, 2019 6:08 pm

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:~$
kmartin2007
 
Posts: 62
Joined: Thu Nov 14, 2019 3:31 pm

PreviousNext

Return to Nagios Core

Who is online

Users browsing this forum: No registered users and 21 guests