Page 1 of 1
Send Repetitive Notification Alerts if the host is down
Posted: Tue Jul 11, 2017 10:36 pm
by kaushalshriyan
Hi,
Is there a way to send nagios notification alerts if the host is down and keep sending repetitive notification alerts till the host is not up? It could be annoying which is fine with us.
Any help will be appreciable. Thanks in Advance
Regards,
Kaushal
Re: Send Repetitive Notification Alerts if the host is down
Posted: Wed Jul 12, 2017 8:39 am
by mcapra
You can adjust how often your notification handler gets triggered by modifying the
notification_interval for a given
host or
service.
More here:
https://assets.nagios.com/downloads/nag ... tions.html
https://assets.nagios.com/downloads/nag ... tions.html
When Do Notifications Occur?
The decision to send out notifications is made in the service check and host check logic. The calculations for whether a notification is to be sent are only triggered when processing a host or service check corresponding to that notification; they are not triggered simply because the <notification_interval> has passed since a previous notification was sent. Host and service notifications occur in the following instances:
- When a hard state change occurs. More information on state types and hard state changes can be found here.
- When a host or service remains in a hard non-OK state and the time specified by the <notification_interval> option in the host or service definition has passed since the last notification was sent out (for that specified host or service).
Re: Send Repetitive Notification Alerts if the host is down
Posted: Wed Jul 12, 2017 11:09 am
by dwhitfield
@kaushalshriyan, did
@mcapra completely answer your question? Did you have any followup?
Thanks
@mcapra!
Re: Send Repetitive Notification Alerts if the host is down
Posted: Wed Jul 12, 2017 8:27 pm
by kaushalshriyan
Hi mcapra and dwhitfield,
I have the below settings for host notifications wherein i have
set notification_interval 5 ; Resend notifications every 5 mins
Does it mean nagios will send host down notification alerts every 5 mins?
Code: Select all
define host{
name linux-server ; The name of this host template
use generic-host ; This template inherits other values from the generic-host template
check_period 24x7 ; By default, Linux hosts are checked round the clock
check_interval 5 ; Actively check the host every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each Linux host 10 times (max)
check_command check-host-alive ; Default command to check Linux hosts
notification_period workhours ; Linux admins hate to be woken up, so we only notify during the day
; Note that the notification_period variable is being overridden from
; the value that is inherited from the generic-host template!
notification_interval 5 ; Resend notifications every 5 mins
notification_options d,u,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
Please guide further.
Thanks mcapra and dwhitfield for the help in Advance.
Regards,
Kaushal
Re: Send Repetitive Notification Alerts if the host is down
Posted: Thu Jul 13, 2017 9:18 am
by dwhitfield
Yes, assuming of course that the host is down and you have a functional email server.
Re: Send Repetitive Notification Alerts if the host is down
Posted: Sun Jul 16, 2017 1:13 am
by kaushalshriyan
Thanks mcapra and dwhitfield for the help. Very much appreciated.
Re: Send Repetitive Notification Alerts if the host is down
Posted: Mon Jul 17, 2017 11:47 am
by bolson
Would it be okay if we close this thread?