I've created a service check for NSClient++ and NRPE versions of remote hosts, to identify both the version of agent on host and to identify which hosts are properly configured. Currently, any host not properly configured is showing critical status for service check.
How can I keep a service from alerting as critical? I understand it's alerting as critical because check is failing, but in this case it is strictly information and does not require action.
Configure Service Alert Status
Re: Configure Service Alert Status
You can just click on the service from the Nagios XI Home page->Service Details, and then click on "Disable notifications" under the "Quick Actions" menu.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
asmgiadmin
- Posts: 125
- Joined: Tue Feb 12, 2013 5:00 pm
Re: Configure Service Alert Status
I have notifications disabled, but since service check is failing, it's showing as critical and also listed as a problem.
In this case, service is not critical to any operation. Is it possible to prevent generating check failure as critical?
In this case, service is not critical to any operation. Is it possible to prevent generating check failure as critical?
Re: Configure Service Alert Status
In this case, you may want to see if the "negate" plugin would do the job for you. It will revert critical to OK. See the usage below:
Code: Select all
/usr/local/nagios/libexec/negate -h
negate v1.4.16 (nagios-plugins 1.4.16)
Copyright (c) 2002-2008 Nagios Plugin Development Team
<[email protected]>
Negates the status of a plugin (returns OK for CRITICAL and vice-versa).
Additional switches can be used to control which state becomes what.
Usage:
negate [-t timeout] [-Towcu STATE] [-s] <definition of wrapped plugin>
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-t, --timeout=INTEGER
Seconds before connection times out (default: 11)
Keep timeout longer than the plugin timeout to retain CRITICAL status.
-T, --timeout-result=STATUS
Custom result on Negate timeouts; see below for STATUS definition
-o, --ok=STATUS
-w, --warning=STATUS
-c, --critical=STATUS
-u, --unknown=STATUS
STATUS can be 'OK', 'WARNING', 'CRITICAL' or 'UNKNOWN' without single
quotes. Numeric values are accepted. If nothing is specified, permutes
OK and CRITICAL.
-s, --substitute
Substitute output text as well. Will only substitute text in CAPITALS
Examples:
negate /usr/local/nagios/libexec/check_ping -H host
Run check_ping and invert result. Must use full path to plugin
negate -w OK -c UNKNOWN /usr/local/nagios/libexec/check_procs -a 'vi negate.c'
This will return OK instead of WARNING and UNKNOWN instead of CRITICAL
Notes:
This plugin is a wrapper to take the output of another plugin and invert it.
The full path of the plugin must be provided.
If the wrapped plugin returns OK, the wrapper will return CRITICAL.
If the wrapped plugin returns CRITICAL, the wrapper will return OK.
Otherwise, the output state of the wrapped plugin is unchanged.
Using timeout-result, it is possible to override the timeout behaviour or a
plugin by setting the negate timeout a bit lower.
Send email to [email protected] if you have questions
regarding use of this software. To submit patches or suggest improvements,
send email to [email protected]
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
asmgiadmin
- Posts: 125
- Joined: Tue Feb 12, 2013 5:00 pm
Re: Configure Service Alert Status
Perfect - thanks!