5 minute notifications

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
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

5 minute notifications

Post by t3dus »

What's the best way for me to set notifications for all hosts to 5 minutes?

We currently have a server and 1 site down but nagios has quit sending out notifications for some unknown reason and this is pretty frustrating.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: 5 minute notifications

Post by ssax »

You would want to set notification_interval to 5 on them:
notification_interval: This directive is used to define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable. Unless you've changed the interval_length directive from the default value of 60, this number will mean minutes. If you set this value to 0, Nagios will not re-notify contacts about problems for this host - only one problem notification will be sent out.
What does your objects.cache show for the host/service that isn't continuing to notify? Please post the definition.
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Re: 5 minute notifications

Post by t3dus »

ssax wrote:You would want to set notification_interval to 5 on them:
notification_interval: This directive is used to define the number of "time units" to wait before re-notifying a contact that this service is still down or unreachable. Unless you've changed the interval_length directive from the default value of 60, this number will mean minutes. If you set this value to 0, Nagios will not re-notify contacts about problems for this host - only one problem notification will be sent out.
What does your objects.cache show for the host/service that isn't continuing to notify? Please post the definition.
This is one of the definitions for the host that failed to continue to notify. It only told us about it maybe 3 times tops and then stopped all together.

Code: Select all

define service{
        service_description             HTTP
        check_command                   custom_check_http
        use                             generic-service
        host_name                       webissues.foodchainid.com
        notifications_enabled           1
        check_freshness                 1
        check_interval                  5
        notification_interval           5
        }
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: 5 minute notifications

Post by ssax »

Please post the service definition from your /usr/local/nagios/var/objects.cache so that we can see the final calculated service definition.
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Re: 5 minute notifications

Post by t3dus »

ssax wrote:Please post the service definition from your /usr/local/nagios/var/objects.cache so that we can see the final calculated service definition.
I think this is what you are after?

Code: Select all

define host {
        host_name       webissues.foodchainid.com
        alias   webissues.foodchainid.com
        address webissues.foodchainid.com
        parents webissues
        check_period    24x7
        check_command   check-host-alive
        contact_groups  sysadmins
        notification_period     workhours
        initial_state   o
        importance      0
        check_interval  5.000000
        retry_interval  1.000000
        max_check_attempts      10
        active_checks_enabled   1
        passive_checks_enabled  1
        obsess  1
        event_handler_enabled   1
        low_flap_threshold      0.000000
        high_flap_threshold     0.000000
        flap_detection_enabled  1
        flap_detection_options  a
        freshness_threshold     0
        check_freshness 1
        notification_options    r,d,u
        notifications_enabled   1
        notification_interval   5.000000
        first_notification_delay        0.000000
        stalking_options        n
        process_perf_data       1
        icon_image      internet.gif
        statusmap_image internet.gd2
        retain_status_information       1
        retain_nonstatus_information    1
        }
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: 5 minute notifications

Post by scottwilkerson »

This should send notifications every 5 minutes, but only during the time period workhours

Code: Select all

notification_period     workhours
If this is not all the times you want you would need to change the notification_period to be one that covers all of the desired times (like 24x7)
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
User avatar
t3dus
Posts: 161
Joined: Thu Feb 04, 2016 3:46 pm
Location: IA
Contact:

Re: 5 minute notifications

Post by t3dus »

Yeah after I saw "workhours" I knew what the issue was instantly. Thanks for the advice.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: 5 minute notifications

Post by scottwilkerson »

t3dus wrote:Yeah after I saw "workhours" I knew what the issue was instantly. Thanks for the advice.
Great!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked