Page 1 of 1

Re: ERROR: Return code of 7 is out of bond

Posted: Mon Dec 11, 2017 10:19 pm
by amgokak
Hi,

We are getting a similar issue as the one, described here: https://support.nagios.com/forum/viewto ... =7&t=43810 but only for specific checks. Other check are working fine.
Here is a sample error
hostxx nagios: Warning: Return code of 7 for check of service 'mssql_database_logfile_auto_growths' on host 'xxxx was out of bounds.
current host and service counts are
479 / 7986
What could be the reason ?

Edit: Topic split/modified by moderators.

Re: ERROR: Return code of 7 is out of bond

Posted: Wed Dec 13, 2017 3:23 pm
by kyang
What OS are you using?

Could you show us your nagios.log

Usually it's located here

Code: Select all

/usr/local/nagios/var/nagios.log
The warning: return code of 7 --> Are these checks using NRPE?

Do the checks work locally?

Can we also see your nrpe.cfg

Re: ERROR: Return code of 7 is out of bond

Posted: Wed Feb 21, 2018 3:18 am
by amgokak
This issue is resolved when we replaced $USER1$ with absolute path of check_nrpe plugin in below command definition.

Old definition (gives return code 7 when number of checks in a service group exceed some limit )
define command {
command_line $USER1$/check_nrpe -2 -H $HOSTADDRESS$ -t 15 -c $ARG1$ -a $ARG2$
command_name check_nrpe
}


New definition (working)
define command {
command_line /usr/lib64/nagios/plugins/check_nrpe -2 -H $HOSTADDRESS$ -t 15 -c $ARG1$ -a $ARG2$
command_name check_nrpe
}

Re: ERROR: Return code of 7 is out of bond

Posted: Wed Feb 21, 2018 10:21 am
by kyang
Sounds good!

Glad you found the issue.

Are we okay to lock this thread? Or did you have any more questions?