We have services setup for disk and memory monitoring for Windows servers, but some hosts don't have NSClient configured correctly. So when Nagios checks them, XI reports a Critical state for those services. Ideally, I would want them to report an Unknown state so it would not send notifications when NRPE doesn't respond on a host. Is there a way I can make that happen?
Command:
/usr/local/nagios/libexec/check_nrpe -H 10.65.99.24 -t 30 -c check_memory -a "warn=free < 3%" "crit=free < 1%"
Output:
CHECK_NRPE STATE CRITICAL: Socket timeout after 30 seconds.
Make NRPE timeouts report an 'Unknown' state
Re: Make NRPE timeouts report an 'Unknown' state
You should be able to use the "-u" flag, added to your command in order to do that.
Example:-u, --unknown-timeout Make connection problems return UNKNOWN instead of CRITICAL
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.65.99.24 -t 30 -c check_memory -a "warn=free < 3%" "crit=free < 1%"
CHECK_NRPE STATE CRITICAL: Socket timeout after 30 seconds.
echo $?
2
/usr/local/nagios/libexec/check_nrpe -H 10.65.99.24 -t 30 -u -c check_memory -a "warn=free < 3%" "crit=free < 1%"
CHECK_NRPE STATE UNKNOWN: Socket timeout after 30 seconds.
echo $?
3Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Make NRPE timeouts report an 'Unknown' state
Perfect! Thank you!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Make NRPE timeouts report an 'Unknown' state
Lockingchstewart wrote:Perfect! Thank you!