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.
5 minute notifications
Re: 5 minute notifications
You would want to set notification_interval to 5 on them:
What does your objects.cache show for the host/service that isn't continuing to notify? Please post the definition.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.
Re: 5 minute notifications
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.ssax wrote:You would want to set notification_interval to 5 on them:
What does your objects.cache show for the host/service that isn't continuing to notify? Please post the definition.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.
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
}
Re: 5 minute notifications
Please post the service definition from your /usr/local/nagios/var/objects.cache so that we can see the final calculated service definition.
Re: 5 minute notifications
I think this is what you are after?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.
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
}
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: 5 minute notifications
This should send notifications every 5 minutes, but only during the time 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)
Code: Select all
notification_period workhours
Re: 5 minute notifications
Yeah after I saw "workhours" I knew what the issue was instantly. Thanks for the advice.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: 5 minute notifications
Great!t3dus wrote:Yeah after I saw "workhours" I knew what the issue was instantly. Thanks for the advice.
Locking thread