Time period only 1st of the month

Hello
I would like to configure a check who run only the 1st of the month
I checked the doc
https://icinga.com/docs/icinga-2/latest/doc/08-advanced-topics/#timeperiods

I try to make like this

object TimePeriod "24h/24 - 1st of the month" {
    import "legacy-timeperiod"
    display_name = "24h/24 - 1st of the month"
    ranges = {
        "day 1"	= "00:00-24:00"
    }
}

but we see it’s not working as excepted if some one have an idea
Regards

For a similar requirement, I use a cronjob to request the execution via API and use a check_interval greater then the cronjob interval.

Thanks you for the tips
I would like not to do this way
If some one else have another idea

Well, Icinga doesn’t allow you to run tasks on specific dates - unlike cron.
Icinga only knows “frequencies”.
So other than Dominiks Idea I don’t have much fantasy. You could maybe have a passive check and schedule a cronjob that submits a passive check result on every 1st of a month.

object TimePeriod "24h/24 - 1st of the month" {
    import "legacy-timeperiod"
    display_name = "24h/24 - 1st of the month"
    ranges = {
        "january 1" 	= "00:00-24:00"
        "february 1"	= "00:00-24:00"
         and so on....
    }
}

according to the docs this would work.

  • The info in icingaweb2 might not be accurate, wait for the actuall check execution. for you this will be the 1st of January
  • do not use the check now button in the mean time

Thanks you
I just modify my time period we’ll see in january :rocket: