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
[dev.icinga.com #7355] Exclude option for TimePeriod definitions #2040
Comments
Updated by mfriedrich on 2014-10-11 15:03:44 +00:00
|
Updated by mfriedrich on 2014-10-11 15:03:54 +00:00
|
Updated by mfriedrich on 2014-11-24 13:15:18 +00:00
|
Updated by mfriedrich on 2014-11-28 16:49:46 +00:00
|
Updated by gbeutner on 2014-12-02 09:50:09 +00:00
|
Updated by gbeutner on 2014-12-02 09:50:51 +00:00
|
Updated by mfriedrich on 2014-12-11 15:50:45 +00:00
Won't happen this year, rescheduling it for the next feature release (so far). |
Updated by mfriedrich on 2015-01-26 15:05:57 +00:00
|
Updated by KeX on 2015-01-28 09:47:05 +00:00 Are there any news/plans for this? Cause we are using this heavily in Icinga1. We would like to migrate to Icinga2, but our configuration rely on this option. |
Updated by mfriedrich on 2015-01-28 10:08:24 +00:00 There are currently no dev resources available for implementing such a feature. Feel free to sponsor a patch. |
Updated by tgelf on 2015-04-22 08:21:43 +00:00 ** I'd also love to see this implemented. "Notify 9to5 but not on holidays" is a very basic feature. It's not needed when playing around or when "just sending mails", but most enterprises with an (even small-sized) IT department have to make sure to not bother their employees on holidays. At least unless they agreed on doing so. In case the "exclude" logic as in Icinga 1.x is too complex to get it working smoothless together with our generic "import" implementation I could also immagine a simpler variant like follows:
Given this, one could create a config as follows:
Of course I could also live with a legacy-like exclude syntax .Implementing the above could be a quick win satisfying most needs while avoiding needless complexity. Cheers, |
Updated by KeX on 2015-04-22 08:32:11 +00:00 We are using this in Icinga 1.x exactly the way, Thomas wrote it! His configuration snip would perfectly fit our needs for Icinga 2! This would be great for icinga2! |
Updated by mfriedrich on 2015-05-19 07:57:44 +00:00
|
Updated by mfriedrich on 2015-06-22 11:14:07 +00:00 I am aware of the issue, and I also do like Tom's approach. Unfortunately I don't have a time estimation nor slot where this can be implemented in the next months. |
Updated by mfriedrich on 2015-06-23 13:36:39 +00:00
|
Updated by gbeutner on 2015-08-27 14:36:41 +00:00 Implementing this with 'import' would probably be the easiest way. However there's an obvious drawback:
Now, while it's immediately obvious to me why the excludes for saturday and sunday aren't working this might be difficult to grasp for ordinary users. I suspect this feature would be more powerful if we implement it like in Icinga 1.x:
Also, this way users wouldn't have to build "negative" time periods (e.g. "not bavarian holidays"). |
Updated by KeX on 2015-08-28 07:37:13 +00:00 The 2nd example you gave, like in Icinga 1.x, would be exactly what I'm looking for.
Would be a great enhancement for the notification system! |
Updated by jerue on 2015-10-30 13:08:48 +00:00 The same like KeX. |
Updated by mfriedrich on 2015-10-30 13:22:17 +00:00 We will re-evaluate all issues on Backlog after the 2.4 milestone release. |
Updated by KeX on 2016-01-29 11:32:39 +00:00 Are there any news on this Issue? For us this is the only show stopper to use icinga2 in production. I'm really looking forward to see this feature in icinga2. |
Updated by drbayer on 2016-02-05 17:55:15 +00:00 +1 I'm trying to migrate from Nagios to Icinga2 and having some way to exclude ranges would be really helpful. As it is today, building a "business hours excluding holidays" (for example) is incredibly tedious. |
Updated by Reamer on 2016-02-28 22:58:57 +00:00
Hi, i try to implement this feature. #71 Hope the code quality is good enough. One Question. What's the different between this two locks "ObjectLock olock(timeranges)" and "ObjectLock dlock(segments)"? Local tests are successfully. |
Updated by mfriedrich on 2016-03-11 20:55:40 +00:00 I did not test it yet, but there's three things to consider with checking the timeperiod ranges on-demand at runtime (IsInside())
|
Updated by Reamer on 2016-03-25 12:37:45 +00:00
Hi, thanks for feedback @dnsmichi Next try with an other idea:
|
Updated by Reamer on 2016-04-16 08:00:19 +00:00 Can i get any feedback? |
Updated by KeX on 2016-04-20 07:23:56 +00:00 Hi, I've testet your patch with Version 2.4.4. It works like expected. My timeperiodes.conf looks like this:
And tested via a passive check. Can't say something about the code quality, but the feature does what we are looking for! I hope this patch finds it's way into the stable release. Thanks for that! |
Updated by KeX on 2016-04-20 12:35:51 +00:00 ... and it works with verison 2.4.5 too :) Chris... |
Updated by mfriedrich on 2016-05-06 07:46:20 +00:00
I'll have a look into the pending review. If nothing goes wrong, 2.5.0 is a good candidate. |
Updated by Reamer on 2016-05-13 20:47:57 +00:00 If i can help you, please let me know. |
Updated by mfriedrich on 2016-05-21 18:34:22 +00:00 ReviewTest-Config (adjust this for a time window for the excluded timeperiod where no checks will happen).
Log:
If I remove "prefer_includes" checks are executed again, since "7355-anytime" wins against the excluded timeperiod. FeatureTo be honest I thought of just adding excludes and not any kind of includes, as you already have the possibility to import other timeperiod objects. Although it is cumbersome to override and modify existing timeperiod attributes from a template. Especially given its old legacy syntax. So from an end user perspective, it totally makes sense to support both, includes and excludes. Obviously not that many users will go for includes, but rather exclude their holidays (and only update that timeperiod object then). CodeAdded some new lines, changes the variable names to capitalised ones. The underscore in variables is old and will be gone once in a while. I've also modified the debug log entry for the checker component to highlight which time period prevents check execution. Same goes for notifications (and users) log entries.
DocumentationAdded an example using holidays and weekend excludes as sub chapter for the time periods. That way the users will see how time period exclusions work in a reasonable example. It also illustrates the different ways of specifying the ranges which was missing in there. IsInsideThose calls from inside the CheckerComponent as well as API work very well since the segments are already updated. External interfacesExternal interfaces such as DB IDO will only dump a very "static" time period time range.
meaning to say, all time ranges parsed from the configuration will be put into the database. Nothing you possibly could rely onto Especially not in Icinga 1.x where the excludes where implemented as well, but not exported into such interfaces. It may of course be relevant for SLA reports to somehow export the config options (although this would require additional DB IDO tables, as timeperiods would have an 1..n relationship to includes/excludes being an array. ConclusionI've tested this now for a couple of hours and reviewed it (doing that on a Saturday on vacation, no time otherwise). I don't have any better names nor a suggestion for prefer_includes. I like the patch, and included my modifications, I've merged it to master. Thanks a lot :) |
Updated by Reamer on 2016-05-21 18:40:03 +00:00
Applied in changeset 54e1c8a. |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/7355
Created by KeX on 2014-10-08 13:14:35 +00:00
Assignee: mfriedrich
Status: Resolved (closed on 2016-05-21 18:40:03 +00:00)
Target Version: 2.5.0
Last Update: 2016-05-21 18:40:03 +00:00 (in Redmine)
Hi
On the icinga-users mailnig list I've seen a discussion about excludes in timeperiodes are not possible in icinga2? We've used this feature for a couple of yours now in icinga1 without a problem. It would be great if this feature is available for icinga2 too.
This is the configuration for icinga1:
And here the documentation:
http://docs.icinga.org/latest/en/objectdefinitions.html#timeperiod
It would be great if this feature finds its way back into icinga2.
Best regards,
Chris...
Attachments
Changesets
2016-05-21 17:02:42 +00:00 by Reamer 699644b
2016-05-21 18:33:09 +00:00 by Reamer 54e1c8a
Relations:
The text was updated successfully, but these errors were encountered: