1

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?

1

This 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*.

1
  • The link said : 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. Mar 26 '18 at 21:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.