-
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
Timeperiod exclusions doesn't work as expected #7398
Comments
Do you have the debug logs from Thursday 09:00 til 10:00 to help mitigate the problem? Obviously the TimePeriod object is used as |
Thanks for your reply. |
Here is a configuration which reproduce the problem on a fresh icinga install on debian stretch and v2.10.5-1 (same environment as my production):
Logs:
The notification period through service vars is working correctly:
To me, in this example, the notification should not have occurred between 9h and 10h. |
I'm a friend of keeping the details inside the notification objects and apply rules, I don't like the old way of stashing everything into hosts and services for notifications. That's also why the notification objects exist, I am one of the architects of that feature. Anyhow, your approach looks sufficient to me, I didn't understand its intention up until now though. Logs will help to mitigate further. You can also create a dummy TimePeriod configuration with the above excludes and then query the REST API at |
Yes I understand :-) For now I need my old prod to work along with Icinga in order to validate everything is working as expected. That's why I did this "bad thing" to make my migration script working. Once Icinga will have replaced my old monitoring infrastructure I'll rewrite my config the Icinga-way :-) |
OK so very stange :-) I manage to reproduce it serveral times.
Timeperiod logs:
If you grep 12:35 for instance it seems that segments addition/removal order is not the same. PS: timeperiod in this example:
|
Sounds like #7239 if you always need to restart twice. |
You're right, the double restart did the trick but in a distributed architecture it seems that |
We're a bit busy with RC testing, so debugging this may take a while. Writing from my ipad here. Meanwhile, I'd suggest to analyse in the debug logs if there's an update between the masters on TimePeriods. I doubt it, but why should it be true all the time. Also, check that the TimePeriod object has paused=false being active. Not sure why that would influence segment calculation, but that's code I am not familiar with. If you're brave, use the centos7-dev vagrant box, compile icinga2 and add breakpoints in gdb for these calculations. The development docs have more insights. |
OK I understand, no problem. I actually have a workaround by defining a timeperiod by manually computing offDuty periods :-)
Unfortunately I won't have the time to debug this for the moment :-/ |
It might be related to serializer fixes with the segments, discussed and fixed with @Elias481 earlier. Though I'm in the midst of 2.11 testing and Icinga meetup Linz preparations, so it will take a while. |
OK no problem I understand :-) |
I don't think is related to serializer fixes in this case, at least I don't see any connection. |
@darkweaver87 Please could you test whether the snapshot packages are still affected. If yes, please also test the packages from here – pick your OS from the "binary" column and then "Download" the "Job artifacts". |
@Al2Klimov: OK I will do but I won't have the time in the next 2 months (at least) unfortunatelly. |
Don't worry, we have time. 🙂 |
OK anyway thanks for trying to fix it :-) |
If the "Job artifacts" are already gone while you're going to test them, please let me know – I'll re-create them. |
PING @darkweaver87 |
Hello, Sorry but I don't work for my previous company anymore, thus I don't have a working environment to validate/invalidate this. Rémi |
I am experiencing the same issue in icinga2 2.10.3-2+deb10u1 (Debian Buster). Could I verify the fix? |
Yes, with these packages: https://git.icinga.com/packaging/deb-icinga2/-/jobs/153741/artifacts/download |
ref/IP/44756 |
Someone closed this issue just now, but due to a missing feature in the GitHub API and the high amount of comments here I can't figure out whether this issue was closed due to a PR merge. Please check by yourself whether this issue is on the correct milestone. |
Describe the bug
In our config, we use two timeperiods, one one excluding the other one and it doesn't seem to work when a time period contains multiple sub-timeperiod.
To Reproduce
Here is a configuration sample:
Expected behavior
To me, in this example, the offDuty period should be 00:00-09:00,09:30-00:00
Your Environment
Include as many relevant details about the environment you experienced the problem in
icinga2 --version
):icinga2 feature list
):icinga2 daemon -C
):Thanks !
The text was updated successfully, but these errors were encountered: