Send Repetitive Notification Alerts if the host is down

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Send Repetitive Notification Alerts if the host is down

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Send Repetitive Notification Alerts if the host is down

Post 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).
Former Nagios employee
https://www.mcapra.com/
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Send Repetitive Notification Alerts if the host is down

Post by dwhitfield »

@kaushalshriyan, did @mcapra completely answer your question? Did you have any followup?

Thanks @mcapra!
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Re: Send Repetitive Notification Alerts if the host is down

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Send Repetitive Notification Alerts if the host is down

Post by dwhitfield »

Yes, assuming of course that the host is down and you have a functional email server.
kaushalshriyan
Posts: 119
Joined: Fri May 22, 2015 7:12 am

Re: Send Repetitive Notification Alerts if the host is down

Post by kaushalshriyan »

Thanks mcapra and dwhitfield for the help. Very much appreciated.
bolson

Re: Send Repetitive Notification Alerts if the host is down

Post by bolson »

Would it be okay if we close this thread?
Locked