PRTG / PRTGScheduler

With PRTG Scheduler, you can configure customized maintenance windows for every PRTG object (Sensors, Devices, and Groups). It allows for various ways of occurrences, like every first Sunday in January, February and March, or only the first week of every month.
MIT License
15 stars 1 forks source link

Next Start Not Correct #16

Closed Manimi-Chart closed 6 years ago

Manimi-Chart commented 6 years ago

I have the comments of my sensor setup as follows: 2018-08-23 11_36_35-sla prime _ sensor details _ prtg network monitor They are two separate maintenance window days, back to back at the same time of day.

However the report shows as follows: 2018-08-23 11_37_27-configuration report_ user accounts and user groups _ prtg network monitor It shows both days as listed. However, the next start day at the top shows the second day, not the first.

Does this mean that the first day won't go into maintenance mode because the second one is on-deck? How do I get the first day to be the Next Start and not the second?

stephanlinke commented 6 years ago

Usually, they should be indeed sorted by their actual date order. Did you configure the timezone (within the application config) and is the user set to UTC?

Manimi-Chart commented 6 years ago

The Application Config default timezone is set to "America/Denver". And the prtgscheduler user timezone is set to UTC.

stephanlinke commented 6 years ago

Alright, good. Then I‘ll need the output of the powershell script with debug being enabled. I‘m currently on vacation, so I can‘t recreate the issue :/

Manimi-Chart commented 6 years ago

Here is the debug results from the PowerShell script. Have a great vacation!

PRTG-Scheduler Debug Output.txt

stephanlinke commented 6 years ago

It‘s seemingly a bug, since the maintenance window gets calculated wrong and is not considered somehow. I‘ll check this next Wednesday when I get back to work :)

stephanlinke commented 6 years ago

@Manimi-Chart I seemingly found the issue in application\models\Maintenance_model.php, line 96. It said krsort($maintenanceWindows); instead of ksort($maintenanceWindows);

This caused the array to be sorted the wrong way (inverse, namely). This is the only change that needs to be done here. I'll commit the changes as well. Thanks for pointing that one out!

Manimi-Chart commented 6 years ago

I can confirm that this did fix the issue. Thank you!

mafer0410 commented 4 years ago

hello, where is the maintenance status configured?