This repository has been archived by the owner on Dec 13, 2022. It is now read-only.
Fix recurrent downtimes with 00:00 or 24:00 #4191
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove P1D in timestamp_stop if end_time==24:00 (added automatic by php)
Add P1D in timestamp_stop if start_time==00:00
Test Downtime cycle 1 :
mer. févr. 17 16:54:27 CET 2016
date -s 18:54:45
[1455731702] [31305] EXTERNAL COMMAND: SCHEDULE_HOST_DOWNTIME;HOSTTEST;1455732000;1455750000;1;0;0;Downtime cycle;[Downtime cycle #1]
[1455731702] [31305] EXTERNAL COMMAND: SCHEDULE_HOST_SVC_DOWNTIME;HOSTTEST;1455732000;1455750000;1;0;0;Downtime cycle;[Downtime cycle #1]
date -s 18:59:45
[1455732000] [31305] HOST DOWNTIME ALERT: HOSTTEST;STARTED; Host has entered a period of scheduled downtime
[1455732000] [31305] SERVICE DOWNTIME ALERT: HOSTTEST;SERVICE1;STARTED; Service has entered a period of scheduled downtime
[1455732000] [31305] SERVICE DOWNTIME ALERT: HOSTTEST;SERVICE2;STARTED; Service has entered a period of scheduled downtime
date -s 23:54:45
[1455749712] [31305] EXTERNAL COMMAND: SCHEDULE_HOST_DOWNTIME;HOSTTEST;1455750000;1455775200;1;0;0;Downtime cycle;[Downtime cycle #1]
[1455749712] [31305] EXTERNAL COMMAND: SCHEDULE_HOST_SVC_DOWNTIME;HOSTTEST;1455750000;1455775200;1;0;0;Downtime cycle;[Downtime cycle #1]
date -s 23:59:45
[1455750000] [31305] HOST DOWNTIME ALERT: HOSTTEST;STOPPED; Host has exited from a period of scheduled downtime
[1455750000] [31305] SERVICE DOWNTIME ALERT: HOSTTEST;SERVICE1;STOPPED; Service has exited from a period of scheduled downtime
[1455750000] [31305] SERVICE DOWNTIME ALERT: HOSTTEST;SERVICE2;STOPPED; Service has exited from a period of scheduled downtime
[1455750000] [31305] HOST DOWNTIME ALERT: HOSTTEST;STARTED; Host has entered a period of scheduled downtime
[1455750000] [31305] SERVICE DOWNTIME ALERT: HOSTTEST;SERVICE1;STARTED; Service has entered a period of scheduled downtime
[1455750000] [31305] SERVICE DOWNTIME ALERT: HOSTTEST;SERVICE2;STARTED; Service has entered a period of scheduled downtime
date -s 06:59:45
[1455775200] [31305] HOST DOWNTIME ALERT: HOSTTEST;STOPPED; Host has exited from a period of scheduled downtime
[1455775200] [31305] SERVICE DOWNTIME ALERT: HOSTTEST;SERVICE1;STOPPED; Service has exited from a period of scheduled downtime
[1455775200] [31305] SERVICE DOWNTIME ALERT: HOSTTEST;SERVICE2;STOPPED; Service has exited from a period of scheduled downtime
jeu. févr. 18 07:07:35 CET 2016