We want to run a service exactly once a day between 20:00 and 20:05 on tuesday and thursday. If the check fails, no retries are to be done (check again only in the next timeframe).
For this we defined a Time-Period:
object TimePeriod "gegen_zwanzig_di_do" {
import "legacy-timeperiod"
display_name = "Dienstags und donnerstags gegen acht Uhr abends (20:00)"
ranges = {
"tuesday" = "20:00-20:05"
"thursday" = "20:00-20:05"
}
}
This definition is used in a service object:
apply Service "aServiceName" {
check_period = "gegen_zwanzig_di_do"
check_interval = 5m
max_check_attempts = 1
check_command = "aCommand"
command_endpoint = host.vars.client_endpoint
assign where host.name == "myHostName"
}
The “max-check-attempts=1” should block retrying , the time-period is 5 minutes “long” and the check-interval is 5 mins as well.
Despite that definition I see that the check was executed at 20:00:07 and ran successfully. Then is is executed again at 20:04:58 and this one fails. The second execution is unexpected.
Does anybody know whats going on here?
Our architecture: A single master controls a satellite. The check itself is running on a client that is only visible to the satellite. Master, satellite and client are part of a zone.
The master runs on Debian 10, Icinga 2.14.2-1.
Satellite and client run under Debian 12, Icinga 2.13.6-1
Another curious thing is: when I look at the web frontend I see
“Last check: 20:04”
“Next check: 20:09”
This is 5 minutes, but 20:09 is outside the time-period. Shouldn’t we expect a schedule that points to the next defined time-period?
Any ideas are appreciated!
Greetings!