Notifications interval
Posted: Fri May 19, 2023 9:56 am
Hello, I I trying to set the notifications work as we need but no luck
1. Firstly, we have to check some services every 10 seconds, so I change in nagios.cfg
2. Next, if state will change to warn/critical we wannt to get first notifications immediately, the next one can be in 1 hour for example, but the service should be checked every 10 second all the time, if state will back to normal we wannt the notifications ASAP.
3. Now, we have working 10 second interval check, notifications start immediately but we have spam on every 10 second...
What should we must to change to get it work ?
1. Firstly, we have to check some services every 10 seconds, so I change
Code: Select all
interval_length=10
2. Next, if state will change to warn/critical we wannt to get first notifications immediately, the next one can be in 1 hour for example, but the service should be checked every 10 second all the time, if state will back to normal we wannt the notifications ASAP.
3. Now, we have working 10 second interval check, notifications start immediately but we have spam on every 10 second...
What should we must to change to get it work ?
Code: Select all
define service {
name router-service ; The 'name' of this service template
use> service-pnp ;
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 1 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 1 ; Re-check the service up to 3 times in order to determine its final (hard) state
check_interval 1 ; Check the service every 10 minutes under normal conditions
normal_check_interval 1 ;
retry_interval 1 ; Re-check the service every two minutes until a hard state can be determined
contact_groups fs24-admin ; Notifications get sent out to everyone in the 'admins' group
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
first_notification_delay 0 ;
notification_interval 600 ; Re-notify about service problems every hour
notification_period 24x7 ; Notifications can be sent out at any time
register 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}