I have a test to make on a server which takes some time. I would like the test to get planned every nights between 3h and 5h AM.
In addition user may launch the test during the day.
Is it possible with Icinga2?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityThis should be possible...
1.Create a TimePeriod, e.g. in timeperiods.conf
object TimePeriod "3to5" {
display_name = "Icinga 2 3to5 TimePeriod"
ranges = {
"monday" = "03:00-5:00"
"tuesday" = "03:00-5:00"
"wednesday" = "03:00-5:00"
"thursday" = "03:00-5:00"
"friday" = "03:00-5:00"
}
}
2.apply Service
apply Service "some_action" {
import "some_check"
max_check_attempts = 1
check_period = "3to5"
...
}
3.to manually execute this service just klick the "check now" button in the web interface
BUT ... the people from monitoring-portal advice against it: https://monitoring-portal.org/woltlab/index.php?thread/41080-schedule-check-on-a-specific-time/ : We can read
Executing a check at a specific time won't really work with Icinga 2 and interval based scheduling. Better create a cronjob for it, and feed the check result into the REST API*.