Report unknown rather than critical for nagios agent failure

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gselvakumar
Posts: 96
Joined: Wed Mar 02, 2016 4:52 am

Report unknown rather than critical for nagios agent failure

Post 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
Thanks & Regards,
Gomathyshankar Selvakumar
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Report unknown rather than critical for nagios agent fai

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Report unknown rather than critical for nagios agent fai

Post by lmiltchev »

Thanks @gormank!

@gselvakumar Let us know if this answers your question. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
gselvakumar
Posts: 96
Joined: Wed Mar 02, 2016 4:52 am

Re: Report unknown rather than critical for nagios agent fai

Post by gselvakumar »

No it is not working for me :cry:

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 /'
Thanks & Regards,
Gomathyshankar Selvakumar
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Report unknown rather than critical for nagios agent fai

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Report unknown rather than critical for nagios agent fai

Post 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.
Former Nagios Employee
Locked