Page 1 of 1
Notification Options
Posted: Mon Mar 30, 2015 2:42 pm
by MilesDeep
All,
I'd like to change the service and host notification options, if possible. For instance, in what cfg file do I find the parameters for a Warning or Critical. It seems I get too many "false" readings. It seems every weekend we get several "Critical" alerts for many remote firewalls. They are very rarely down or down for any significant amount of time. Where do I change what is considered Critical? Maybe I can create an alert called "The circuit is really, really slow..." If 4 of 5 dropped pings produces a Critical alert, is there a way to, say, make it report only if the failed pings persist for 20 minutes?
Thanks any insight.
service_notification_options w,u,c,r,f,s
Re: Notification Options
Posted: Mon Mar 30, 2015 2:56 pm
by jdalrymple
The directives you need to pay attention to are
max_check_attempts
retry_interval
Here is your reference:
http://nagios.sourceforge.net/docs/3_0/ ... .html#host
Re: Notification Options
Posted: Mon Mar 30, 2015 3:13 pm
by MilesDeep
Excellent, thanks.
Can I actually change what critical means? It seems I'm just changing the duration between checks or changing the maximum number of checks. This would not affect what was alerted, would it? What determines what critical is? 1 ping of 5? That's not critical, that's just slow. 0 pings returned of 5, every 5 minutes for 20 minutes, in the middle of the night, that's critical.
Re: Notification Options
Posted: Mon Mar 30, 2015 3:20 pm
by jdalrymple
You bet. The host checks are just like any other service check, usually it's either check_icmp or check_ping. You can modify the command definition in commands.cfg or the arguments (warning, critical thresholds and such) in the host definition.
To get a better idea what's going on under the hood it might be useful to look at the help for check_ping:
Code: Select all
[jdalrymple@localhost libexec]$ ./check_ping --help
check_ping v2.0.3 (nagios-plugins 2.0.3)
Copyright (c) 1999 Ethan Galstad <[email protected]>
Copyright (c) 2000-2014 Nagios Plugin Development Team
<[email protected]>
Use ping to check connection statistics for a remote host.
Usage:
check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%
[-p packets] [-t timeout] [-4|-6]
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
--extra-opts=[section][@file]
Read options from an ini file. See
https://www.nagios-plugins.org/doc/extra-opts.html
for usage and examples.
-4, --use-ipv4
Use IPv4 connection
-6, --use-ipv6
Use IPv6 connection
-H, --hostname=HOST
host to ping
-w, --warning=THRESHOLD
warning threshold pair
-c, --critical=THRESHOLD
critical threshold pair
-p, --packets=INTEGER
number of ICMP ECHO packets to send (Default: 5)
-L, --link
show HTML in the plugin output (obsoleted by urlize)
-t, --timeout=INTEGER
Seconds before connection times out (default: 10)
THRESHOLD is <rta>,<pl>% where <rta> is the round trip average travel
time (ms) which triggers a WARNING or CRITICAL state, and <pl> is the
percentage of packet loss to trigger an alarm state.
This plugin uses the ping command to probe the specified host for packet loss
(percentage) and round trip average (milliseconds). It can produce HTML output
linking to a traceroute CGI contributed by Ian Cass. The CGI can be found in
the contrib area of the downloads section at http://www.nagios.org/
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]
Re: Notification Options
Posted: Mon Mar 30, 2015 3:57 pm
by MilesDeep
That's what I'm talking about: Example Linux server, Disk monitoring
(Linux.cfg >> Service Definitions)
define service{
use local-service
host_name localhost
service_description Root Partition
check_command check_local_disk!20%!10%!/
}
*****************************************
(Commands.cfg>> Service Check Commands)
# 'check_local_disk' command definition
define command{
command_name check_local_disk
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}
Re: Notification Options
Posted: Mon Mar 30, 2015 4:04 pm
by jdalrymple
Are you asking for further clarification, I don't really understand the question if that is one... or can we lock this topic?
Re: Notification Options
Posted: Tue Mar 31, 2015 8:23 am
by MilesDeep
Please lock it. Thanks for your help.