Send Repetitive Notification Alerts if the host is down

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Send Repetitive Notification Alerts if the host is down

Postby kaushalshriyan » Tue Jul 11, 2017 10:36 pm

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
kaushalshriyan
 
Posts: 53
Joined: Fri May 22, 2015 7:12 am

Re: Send Repetitive Notification Alerts if the host is down

Postby mcapra » Wed Jul 12, 2017 8:39 am

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://github.com/mcapra/
User avatar
mcapra
 
Posts: 2575
Joined: Thu May 05, 2016 3:54 pm

Re: Send Repetitive Notification Alerts if the host is down

Postby dwhitfield » Wed Jul 12, 2017 11:09 am

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

Thanks @mcapra!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3250
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Re: Send Repetitive Notification Alerts if the host is down

Postby kaushalshriyan » Wed Jul 12, 2017 8:27 pm

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
kaushalshriyan
 
Posts: 53
Joined: Fri May 22, 2015 7:12 am

Re: Send Repetitive Notification Alerts if the host is down

Postby dwhitfield » Thu Jul 13, 2017 9:18 am

Yes, assuming of course that the host is down and you have a functional email server.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 3250
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC

Re: Send Repetitive Notification Alerts if the host is down

Postby kaushalshriyan » Sun Jul 16, 2017 1:13 am

Thanks mcapra and dwhitfield for the help. Very much appreciated.
kaushalshriyan
 
Posts: 53
Joined: Fri May 22, 2015 7:12 am

Re: Send Repetitive Notification Alerts if the host is down

Postby bolson » Mon Jul 17, 2017 11:47 am

Would it be okay if we close this thread?
Brian Olson
Nagios Support Team
---
Nagios Enterprises, LLC
Email: customersupport@nagios.com
Web: https://www.nagios.com/
User avatar
bolson
 
Posts: 95
Joined: Tue Jul 11, 2017 10:34 am


Return to Nagios Core

Who is online

Users browsing this forum: sirampadu, squirrely73 and 34 guests