Page 1 of 1
Report unknown rather than critical for nagios agent failure
Posted: Thu Aug 11, 2016 8:49 am
by gselvakumar
Hi Team,
Help needed
We using nagios for monitoring Linux,AIX and windows. We have installed agent on these servers. Due to some patching activities agent gets stopped on the server and all the parameter for the server becomes critical and alert gets triggered for the all services for the server as have integrated nagios with servive now ticket is being generated for these alerts and Infra team is complaining that false being triggered by nagios .So we need to avoid such issue, we that alert as unknown instead critical.
Thanks
Re: Report unknown rather than critical for nagios agent fai
Posted: Thu Aug 11, 2016 1:54 pm
by gormank
You can add the -u arg to the check_nrpe command definition. I also use a notification delay in my templates so transient issues like this get filtered if they resolve themselves...
# /usr/local/nagios/libexec/check_nrpe -h
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (
[email protected])
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
Usage: check_nrpe -H <host> [ -b <bindaddr> ] [-4] [-6] [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]
Options:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
<host> = The address of the host running the NRPE daemon
<bindaddr> = bind to local address
-4 = user ipv4 only
-6 = user ipv6 only
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.
Re: Report unknown rather than critical for nagios agent fai
Posted: Thu Aug 11, 2016 3:50 pm
by lmiltchev
Thanks @gormank!
@gselvakumar Let us know if this answers your question. Thanks!
Re: Report unknown rather than critical for nagios agent fai
Posted: Tue Aug 30, 2016 7:35 am
by gselvakumar
No it is not working for me
The command I am using is mentioned below let me know it is right?
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H xxxxxxxxxxxxxx -t 30 -u -c check_disk -n -a '-w 20% -c 10% -p /'
Re: Report unknown rather than critical for nagios agent fai
Posted: Tue Aug 30, 2016 10:37 am
by gormank
I'd suggest you run your command above from the shell as nagios when it will fail during patching, then run echo $? and post all of it here.
Re: Report unknown rather than critical for nagios agent fai
Posted: Tue Aug 30, 2016 2:21 pm
by rkennedy
Thanks @gormank!
It looks right, please do what @gormank mentioned and post the output of the full commands entered over the CLI, as well as the echo $?[/icode[ so we can see the exit code.