jin
December 9, 2024, 4:22pm
1
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
rivad
(Dominik)
December 9, 2024, 4:43pm
2
For a similar requirement, I use a cronjob to request the execution via API and use a check_interval greater then the cronjob interval.
jin
December 10, 2024, 2:10pm
3
Thanks you for the tips
I would like not to do this way
If some one else have another idea
bberg
December 10, 2024, 2:16pm
4
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
jin
December 16, 2024, 4:52pm
6
Thanks you
I just modify my time period we’ll see in january