[dev.icinga.com #1867] Recurring Downtimes #729
Comments
Updated by mfriedrich on 2011-09-12 13:33:34 +00:00
i don't understand the feature request. is this a core related configuration item, or just a gui read only feature? |
Updated by mjbrooks on 2011-09-15 18:34:11 +00:00 Core. The basic idea is that, for example, you know your sever will be down every Sunday and you want to just say, every Sunday there is a downtime for this server (or hostgroup even) instead of having to put them in one by one ahead of time. I'm thinking this could be quite involved because it might require some serious effort, like a whole new scheduler. I think in the end it would be effort well spent, I'm just saying that it would be more than just a minor tweak even though it may look like it on the surface. +1 for the idea |
Updated by mfriedrich on 2011-09-30 22:08:46 +00:00
well he could have provided more accurate information in the first place. not everyone knows about such addons like the cgi to be found on the web. |
Updated by Wolfgang on 2011-10-05 19:10:30 +00:00 Somehow I overlooked this issue... and began to create a new perl script similar to Steve Shipways file. That means it will read the icinga.cfg to determine the name of the status file which in turn will be used to read the existing downtimes. Then a file with downtime definitions will be processed. I intend to use something like
Planned for now:
Another script will convert existing definitions created for Steve's script. |
Updated by mfriedrich on 2011-11-09 10:13:21 +00:00
|
Updated by Wolfgang on 2011-11-18 00:08:12 +00:00
First try including scheduling script, some lines of documentation, and a conversion script. |
Updated by Wolfgang on 2012-03-04 21:48:42 +00:00
second version of sched_down.pl script including holidays based on easter and enabling local holidays |
Updated by Wolfgang on 2012-03-04 21:56:01 +00:00 Holidays based on easter
Define local holidays in separate file
Use of local holidays (last monday in may)
|
Updated by Wolfgang on 2012-03-07 18:23:53 +00:00
|
Updated by Wolfgang on 2012-03-07 18:24:02 +00:00
|
Updated by Wolfgang on 2012-03-07 19:36:54 +00:00
removed some bugs |
Updated by Wolfgang on 2012-03-14 23:31:46 +00:00
|
Updated by Wolfgang on 2012-03-14 23:33:22 +00:00
fixed calculation of duration, added call for crontab in docs |
Updated by m4rcu5 on 2012-03-18 21:56:44 +00:00
I was testing the script of Wolfgang today. It seems that it only adds one service downtime at each run instead of adding all for the upcoming period?
Running the script again immediately afterwards adds the next service, i have to repeat it until all of them are added. The full debug and downtime.cfg are attached. One other thing i noticed is that attaching the opening bracket to the word "downtime" as is common in the Icinga configs will break the script. |
Updated by Wolfgang on 2012-03-19 11:06:57 +00:00
Thanks for your feedback. Attached a new version fixing these errors. |
Updated by Wolfgang on 2012-03-19 11:07:17 +00:00
|
Updated by m4rcu5 on 2012-03-19 20:16:29 +00:00 Confirmed, works like a charm now. Thanks! |
Updated by mfriedrich on 2012-03-19 22:42:34 +00:00 hm. from the source this looks good. could this be somehow included in the icinga package? if so, please add a license header with copyright. and please remove the mention of xi being a trademark in the docs - name it the "commercial nagios version". |
Updated by Wolfgang on 2012-03-20 19:38:04 +00:00
Added some perfdata, moved most output to STDERR, fixed docs |
Updated by Wolfgang on 2012-03-20 19:38:12 +00:00
|
Updated by mfriedrich on 2012-03-20 23:09:28 +00:00 fixed docs plus header looks good. any proposals on how to integrate this within upstream package? |
Updated by Wolfgang on 2012-03-21 20:13:50 +00:00
@m4rcu5: have a try A comma-separated list of objects per hostgroup/servicegroup/host/service description should be possible. |
Updated by Wolfgang on 2012-03-21 20:13:58 +00:00
|
Updated by m4rcu5 on 2012-03-21 20:31:58 +00:00 @wolfgang: Seems to work, thanks!
To make the brackets more compliant to the rest of the configs, could you make the following change on line 320?:
|
Updated by Wolfgang on 2012-03-21 20:42:14 +00:00
Darn. I missed that occurrence. |
Updated by Wolfgang on 2012-03-21 20:42:22 +00:00
|
Updated by mfriedrich on 2012-03-21 20:45:42 +00:00 hm. can you start this over in git in your wnieder branch in icinga-core.git? that would make more sense to me. place it somewhere in contrib/ |
Updated by Wolfgang on 2012-03-22 22:08:36 +00:00
|
Updated by Wolfgang on 2012-03-22 22:11:56 +00:00 Scripts now in git (wnieder/downtimes in icinga-core), docs in r1.7 (icinga-docs and most of it already in this issue). |
Updated by m4rcu5 on 2012-03-24 23:05:24 +00:00 It seems that specifying the duration is not enough anymore to enable flexible downtimes. You now need to specifically set "fixed 0" to enable flexible downtimes.
|
Updated by Wolfgang on 2012-04-20 06:11:25 +00:00 The scheduling script itself seems to work as expected so I'd include the script (and the documentation) in 1.7. Managing downtimes via GUI is not supported yet but creating a definition file using your favourite editor is sufficient so (nearly) everyone can use the functionality. |
Updated by mfriedrich on 2012-04-20 10:28:35 +00:00 question is about possible "make install blablabla" and possible dependencies therefore (packages...) |
Updated by Wolfgang on 2012-04-20 10:35:11 +00:00 Dependencies: Perl module "Time::Local" |
Updated by ziesemer on 2012-07-15 08:18:19 +00:00 I don't believe this is working for simply scheduling a servicegroup, as follows:
I.E., when run in debug, no "CMD:" lines are output. However, if I add a hostgroup:
Then something happens:
However, this is no different than if no servicegroups were specified at all:
Yields:
I need to see a SCHEDULE_SERVICEGROUP_SVC_DOWNTIME here somehow, to duplicate what is a standard operation through the UI. I can make this work if I comment out the block starting out at line #428 in the script - but I'm not sure why a match isn't being made here:
|
Updated by Wolfgang on 2012-07-15 18:11:15 +00:00 Please test `- (%hg,%sg) = read_object_file ($oFile,3);
`- return (%hGroup, %sGroup);
|
Updated by ziesemer on 2012-07-15 20:56:30 +00:00 Wolfgang - thanks, that fixed it. (Yeah, I wasn't going to find that too quickly... :-) |
Updated by ziesemer on 2012-07-15 21:10:36 +00:00 Well - not quite. The icinga.log shows:
So the service group name isn't actually being sent over to the command file (nor is it logged as such). I can partially fix this with:
However, if my configuration contains |
Updated by ziesemer on 2012-07-16 01:17:55 +00:00
I'm a little out of my territory here, but attached is a possible patch. It includes your above comment #39, and both my notes from comment #41 (fixing the $extcmd string, and supporting multiple service groups). What isn't working is that when run multiple times, duplicate downtimes are being scheduled into Icinga (and I'm not sure how to fix this - so please don't reserve this for me to fix. : However, overall, I think a comprehensive review is needed to ensure that the script supports what is documented. Are there any existing test cases that I could expand upon? |
Updated by Wolfgang on 2012-07-16 05:48:57 +00:00 Please pull the current version from git (which should solve the issue running the script multiple time), apply the changes I proposed for service groups and retry. If it still doesn't work then please create a new thread on www.monitoring-portal.org for that. |
Updated by Wolfgang on 2012-07-16 11:54:55 +00:00 I shouldn't have answered so early in the morning :-(. |
Updated by mfriedrich on 2012-10-24 17:53:38 +00:00
think of a different core, this should be doable within #2833 while adding (experimental) support here. though, it might happen that this does not hit the final release. |
Updated by ziesemer on 2012-12-18 21:15:58 +00:00 It's been a while, and I'm finally re-visiting this, but I'm pretty certain this still needs some attention. I'm using the contrib/downtimes/sched_down.pl that was bundled with 1.8.3 - which appears identical to the GIT head at https://git.icinga.org/?p=icinga-core.git;a=blob;f=contrib/downtimes/sched\_down.pl;h=99d5252932c9e5a8a2b3f1d2cf6313201dadc19a;hb=master . Things have changed a bit, but are still not correct. As-is (without patching), with a downtime config that contains only "servicegroups", "author", "comment", and "downtime_period", I still see "CMD:SCHEDULE_SERVICEGROUP_HOST_DOWNTIME" being logged. This should be a "SCHEDULE_SERVICEGROUP_SVC_DOWNTIME" instead. Can you please offer some additional guidance as to what needs to happen here to get this working properly? Thanks! |
Updated by fgr on 2012-12-20 13:56:17 +00:00 Hi! Scheduled downtimes are not correcly recognized, if they're defined for a period of some days, e.g. "downtime_period 2012-12-15 - 2012-12-30 20:00-21:00". They're ignored until the "plan ahead" option catches either the start or the end date - then they're scheduled correctly for the next occurance:
|
Updated by mjbrooks on 2013-05-04 20:25:19 +00:00 Is this still open Wolfgang? |
Updated by mjbrooks on 2013-05-04 20:33:57 +00:00 Never mind... I just saw it on the roadmap. ;) |
Updated by mfriedrich on 2013-06-29 15:55:09 +00:00 what's the general status of that? is it something which may be pulled out of contrib/ into a supported location for 1.10 or is it still "under development"? |
Updated by mfriedrich on 2013-07-20 12:21:40 +00:00
|
Updated by mfriedrich on 2013-07-20 12:44:42 +00:00
|
Updated by mjbrooks on 2014-01-13 03:45:03 +00:00 Will this be official in 1.11? Are we on target for this to have all the bugs worked out? |
Updated by ziesemer on 2014-01-13 04:52:44 +00:00 Having looked into this a fair amount previously (as visible in the above comments), I've largely given up on this for 1.x - though please surprise me otherwise! I think there are a number of design issues - both ones that were touched on here but not completely resolved, and others that I haven't even brought to attention yet - which prevent this from becoming a reality in 1.x, at least not one that is "stable", robust, and one that I would trust in our production environment. The fact that we have to regularly schedule a job to pre-schedule scheduled downtimes just "seems wrong". I think the best solution would be to have a "1st class" configuration option for scheduled downtimes, just as we can currently schedule notification periods and checks (and exclusions to those periods). However, this would require some significant additions to the current core - which I would agree with the Icinga team that this is work probably best saved for Icinga 2.x. And it seems like some recent progress has been made on this front, as visible at http://feedback.icinga.org/forums/50329-general/suggestions/1120561-add-recurring-downtimes . I just haven't had a chance to review what is being offered here - though I anxiously await an official, "stable" release of Icinga 2 to start considering as an upgrade. (I am not an Icinga developer - just a user, and the opinions expressed here are only my own $0.02.) |
Updated by mfriedrich on 2014-03-03 18:54:01 +00:00
feature freeze 1.11 |
Updated by mfriedrich on 2014-10-24 23:15:13 +00:00 Is this still a viable option, or what's the status of this? |
Updated by mfriedrich on 2014-10-26 19:13:20 +00:00
|
Updated by Wolfgang on 2014-10-28 17:50:17 +00:00
I fixed several issues during the last months and added support for "workdays".
" will result in
. Adding "twelfth_day day_off" to the holiday file will change that to the next day. @ziesemer @fgr |
Updated by mfriedrich on 2015-02-14 20:14:42 +00:00
I'll add that to tools/downtimes, update the documentation and we'll close this issue. Future bugs should be reported just like normal. |
Updated by mfriedrich on 2015-02-14 21:10:02 +00:00
Applied in changeset cd0c205. |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/1867
Created by pdeneu on 2011-08-31 11:38:54 +00:00
Assignee: Wolfgang
Status: Resolved (closed on 2015-02-14 21:10:02 +00:00)
Target Version: 1.13
Last Update: 2015-02-14 21:10:02 +00:00 (in Redmine)
new feature request for icinga classic (and icinga-web) is to define recurring timeperiods.
for example to define on every second saturday in month a downtime for specific hosts or services.
recurring downtimes on hostgroups (on all hosts of group) can be a nice feature too.
Attachments
Changesets
2015-02-14 21:04:47 +00:00 by mfriedrich cd0c205
2015-02-14 21:09:20 +00:00 by mfriedrich 6806d8f
Relations:
The text was updated successfully, but these errors were encountered: