Nagios only attempts one time
Jim Avery
jim at jimavery.me.uk
Wed Sep 29 21:32:44 CEST 2010
On 29 September 2010 18:37, Helder <helderbn at gmail.com> wrote:
> Hi everybody!
>
> I configured my Nagios 3 to verify 4 times if a service is really with
> problem, but it only attempts one time. My configuration if below:
>
> define service{
> use generic-service;
> notifications_enabled 1
> check_period 24x7
> normal_check_interval 300 ; 5 minutes
> retry_check_interval 60; 1 minute
> max_check_attempts 4; 4 times with the new retry_check_interval
> to verify if the problem persists
> notification_period 24x7
> notification_options u,c
> contact_groups nsi
> hostgroup_name dns_servers
> service_description Resolucao Interna
> check_command check_dns!proxies.trt18.jus.br
> }
>
> I confirm in the log and really only one time was verified and the CRITIC
> state was alarmed.
If the corresponding host is down or unreachable, the service will go
immediately in to a hard state (but the notification sent should be a
host notification not a service notification).
Nagios will display warning, critical etc, states on screen as soon as
a check returns that state. The max_check_attempts only affects when
it will send a notification (email usually) or trigger an event
handler and so on (when it goes from a soft to a hard state).
Note that by default, the numbers for normal_check_interval and
retry_check_interval are in minutes, not seconds. This is set by the
interval_length directive in your nagios.cfg file. I recommend
keeping it that way. So.. in your service definition, you probably
need:
normal_check_interval 5 ; 5 minutes
retry_check_interval 1 ; 1 minute
See:
http://nagios.sourceforge.net/docs/3_0/configmain.html#interval_length
For more information on hard and soft states, see:
http://nagios.sourceforge.net/docs/3_0/statetypes.html
I hope that helps,
Jim
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list