-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recuring Downtime wrong dates specific month #7061
Comments
Sounds like an off-by-one error in the timeperiod calculation code. Anyone up for a patch is more than welcome. |
@htriem I see that you've assigned this issue to yourself. Are you working on this or would it be okay if I take this up as my first issue? |
PING @htriem |
Oh, sounds like something I've written down as "looks like this might be broken, should maybe look if this is indeed a problem" to my todo list while working on #8921. Looks like the search for the last n-th weekday includes the first day of the following month there: icinga2/lib/icinga/legacytimeperiod.cpp Lines 63 to 75 in 8a704fb
|
While working on #8921? An already merged PR? |
Yes? I didn't say that the PR is supposed to fix the issue. Just read "while working on #8921" as "the last time I looked at |
@lakshmanaram Yes, go for it. |
I've successfully reproduced this! [2024-06-21 00:01:00 +0000] debug/ScheduledDowntime: Creating new Downtime for ScheduledDowntime "docker-master!something-happened"
[2024-06-21 00:01:00 +0000] debug/ScheduledDowntime: Finding running scheduled downtime segment for time 1718928060 (minEnd -)
[2024-06-21 00:01:00 +0000] debug/ScheduledDowntime: Evaluating (running?) segment: monday -1: 05:45-07:15
[2024-06-21 00:01:00 +0000] debug/ScheduledDowntime: Finding next scheduled downtime segment for time 1718928060
[2024-06-21 00:01:00 +0000] debug/ScheduledDowntime: Evaluating segment: monday -1: 05:45-07:15
[2024-06-21 00:01:00 +0000] debug/ScheduledDowntime: Considering segment: Mon Jul 1 05:45:00 2024 -> Mon Jul 1 07:15:00 2024
[2024-06-21 00:01:00 +0000] debug/ScheduledDowntime: (best match yet) |
Describe the bug
i have a problem with recurring downtimes in my Icinga. i have a host that is always shut down on the last Monday of the month for maintenance.
For a while this worked quite well. but since last month, this does not work properly.
In IcingaWeb2 the downtime is planed for 01.04.2019 but the last monday in april is the 29th.
from debug log:
If I look at it that way, the result for January, February, march and june is not correct. However, all other months fit again.
Screenshots
https://community.icinga.com/uploads/default/original/1X/0ee1bcf4b80f39490b5caef7eca6a089fe678dcb.png
Your Environment
My System:
Ubuntu 16.04.6 LTS
Icinga2 r2.10.4-1
Icingaweb2: 2.6.2
watch Icinga forum for more infos:
https://community.icinga.com/t/recuring-downtime-wrong/740
regards,
Basti
The text was updated successfully, but these errors were encountered: