Different timeperiods for the same service
Posted: Mon Apr 14, 2014 9:34 am
Hello guys,
I'd like to check a service and do different thins depending on the time:
Let's say:
define service{
use generic-service
service_description Service_PING
host_name host1
check_command check_ping!2000.0,80%!5500.0,99%
check_period nonworkhours
max_check_attempts 10
retry_check_interval 3
normal_check_interval 5
event_handler_enabled 1
event_handler retryPing
}
During non-working hours, it executes the event_handler.
define service{
use generic-service
service_description Service_PING
host_name host2
check_command check_ping!2000.0,80%!5500.0,99%
check_period workhours
normal_check_interval 5
}
And on working hours, just check as normal.
Does that work? Is there a better way to do this?
Thanks in advance.
I'd like to check a service and do different thins depending on the time:
Let's say:
define service{
use generic-service
service_description Service_PING
host_name host1
check_command check_ping!2000.0,80%!5500.0,99%
check_period nonworkhours
max_check_attempts 10
retry_check_interval 3
normal_check_interval 5
event_handler_enabled 1
event_handler retryPing
}
During non-working hours, it executes the event_handler.
define service{
use generic-service
service_description Service_PING
host_name host2
check_command check_ping!2000.0,80%!5500.0,99%
check_period workhours
normal_check_interval 5
}
And on working hours, just check as normal.
Does that work? Is there a better way to do this?
Thanks in advance.