Page 1 of 1

Nagios check_freshness (Return code of 13 is out of bounds)

Posted: Mon Oct 26, 2015 7:25 am
by mkaegi
Hi All,

We are using Nagios 4.0.8 on a Red Hat linux.

Everything is working fine for quit a while.

Now I want introduce check_freshness for our passive service checks.
Thus I was adding below to one of our passive service check definitions:

check_freshness 1
freshness_threshold 30

I have stopped to provide passive check data for given service check.
Now in the Nagios Web Frontend I see the service status has changed to Critical and it says (Return code 13 is out of bounds).
I would expect status Unknown and message "Freshness Check Failed: Threshold Exceeded". Right?

What I'm doing wrong? How can I fix this?

Thanks and regards,
Michael

Re: Nagios check_freshness (Return code of 13 is out of boun

Posted: Mon Oct 26, 2015 4:04 pm
by tgriep
Can you post how the service check is configured?
One thing that could cause this is if the plugin stores files on the system for performance data and you ran the check as root, it would create the tmp file with root permissions and then the nagios user would not have permissions to write to that file. Check the /tmp folder to see if that is true.

Re: Nagios check_freshness (Return code of 13 is out of boun

Posted: Tue Oct 27, 2015 9:20 am
by DiegoAnjos
Usually when I got the message (Return code of 13 is out of bounds) it is related to the plugin file permissions.

Check the check_fresness file and change its permissions to rwxr-xr-x to nagios user and nagios group.

Re: Nagios check_freshness (Return code of 13 is out of boun

Posted: Tue Oct 27, 2015 4:53 pm
by ssax
mkaegi, let us know what you find.

Thank you

Re: Nagios check_freshness (Return code of 13 is out of boun

Posted: Wed Oct 28, 2015 10:29 pm
by Box293
What check command have you defined in the service? This command will be executed when the freshness is exceeded.

https://assets.nagios.com/downloads/nag ... hness.html
mkaegi wrote:I would expect status Unknown and message "Freshness Check Failed: Threshold Exceeded". Right?
You would need to define that is your command, like using check_dummy:

Code: Select all

define command{
	command_name	freshness failed
	command_line	/usr/local/nagios/libexec/check_dummy 2 "CRITICAL: Freshness Check Failed: Threshold Exceeded!"
	}

Re: Nagios check_freshness (Return code of 13 is out of boun

Posted: Thu Oct 29, 2015 4:41 am
by mkaegi
Hi All,

Thanks for the suggestions. Currently I'm buy with other things. Thus the delay.
As soon I have time to work on this I will let you know...

Thanks and regards,
Michael

Re: Nagios check_freshness (Return code of 13 is out of boun

Posted: Thu Oct 29, 2015 9:06 am
by rkennedy
Thanks for letting us know. I will leave this thread open and await your response.