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

A PHP Error was encountered #11

Closed deejey01 closed 6 years ago

deejey01 commented 6 years ago

Hello, when I start the powershell script no mantanance window is found and I get this error message:

A PHP Error was encountered

Severity: Warning Message: Cannot modify header information - headers already sent by (output started at C:\php\app\application\contr ollers\PrtgScheduler.php:36) Filename: C:\php\app\application\controllers\PrtgScheduler.php Line Number: 38

Backtrace: File: C:\php\app\application\controllers\PrtgScheduler.php Line: 38 Function: header

    File: C:\php\app\index.php
    Line: 315
    Function: require_once

[27.11.2017 12:59:16]|_ PHP 7.1.12 | CodeIgniter 3.1.5 | PRTG Scheduler 1.0 [27.11.2017 12:59:16]| No sensors with configured maintenances found. [27.11.2017 12:59:16]| No devices with configured maintenances found. [27.11.2017 12:59:16]| No groups with configured maintenances found. [27.11.2017 12:59:16]| Maintenance list is empty, creating a new one. [27.11.2017 12:59:16]| Active maintenances couldn't be updated. Error: (0) [27.11.2017 12:59:16]| Maintenance list is empty, creating a new one. [27.11.2017 12:59:17]| Active maintenances couldn't be updated. Error: (0) [27.11.2017 12:59:17]| Maintenance list is empty, creating a new one. [27.11.2017 12:59:17]|__ Active maintenances couldn't be updated. Error: (0) {"prtg":{"result":[{"Channel":"Sensor-Wartungsfenster","Value":0},{"Channel":"Ger\u00e4te-Wartungsfenster","Value":0},{ "Channel":"Gruppen-Wartungsfenster","Value":0},{"Channel":"Wartungsfenster","Value":0},{"Channel":"Fehlerhafte Definiti onen","Value":0}],"text":""}}

I double checked my configuration and I think it is ok. I use a newer php version (7.1.12) because I can't find the recomended version.

Regards, Ben

stephanlinke commented 6 years ago

The sensor should work nonetheless - did you already try to create it?

deejey01 commented 6 years ago

Yes, I created a prtgscheduler sensor directly under the probe device and I wrote the mantanance info in the comments of the device object. I use your example:

maintenance[daily-3-9/06/2017|all|all|all|23:00|23:30|SLA Window]

The prtgscheduler user has set to the UTC timezone. But still nothing found.

deejey01 commented 6 years ago

I found my mistake: the prtgscheduler user was in the group "prtg users" not in the "prtg admins". I changed it to "prtg admins" and now it works. But I can't see the Maintenance Window Report in the webgui. I use the latest version 17.4.35.3441 with the new look.

stephanlinke commented 6 years ago

Ah! :) The tool needs an update in order to support the latest version. I'll check what path you need to change and let you know in the meantime.

stephanlinke commented 6 years ago

@deejey01 Please see https://github.com/PRTG/PRTGScheduler/issues/12 for the corresponding changes that need to be made :)

Manimi-Chart commented 6 years ago

I had the same issue that deejey01 was having. Changing the PRTG Schduler User to the Admin group fixed the issue. There is no mention in the setup instructions that the user needs to be an admin. Please update for future use.