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

Check correct working of PHP?? #18

Open fredhohenstein opened 6 years ago

fredhohenstein commented 6 years ago

How can I check that the php part of this application is working correctly?

When I run the powershell script I receive the following inforamtion: PS C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML> C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML\PRTG-Scheduler.ps1

[31.10.2018 19:06:40]|_ PHP 7.2.8 | CodeIgniter 3.1.5 | PRTG Scheduler 1.0
[31.10.2018 19:06:40]|__ No sensors with configured maintenances found.
[31.10.2018 19:06:40]|__ No devices with configured maintenances found.
[31.10.2018 19:06:40]|__ No groups with configured maintenances found.
[31.10.2018 19:06:40]|__ Maintenance list is empty, creating a new one.
[31.10.2018 19:06:40]|__ Active maintenances couldn't be updated. Error: (0)
[31.10.2018 19:06:40]|__ Maintenance list is empty, creating a new one.
[31.10.2018 19:06:40]|__ Active maintenances couldn't be updated. Error: (0)
[31.10.2018 19:06:40]|__ Maintenance list is empty, creating a new one.
[31.10.2018 19:06:40]|__ Active maintenances couldn't be updated. Error: (0)
{"prtg":{"result":[{"Channel":"Sensor Maintenance(s)","Value":0},{"Channel":"Device Maintenances(s)","Value":0},{"Channel":"Group Maintenances(s)","Val
ue":0},{"Channel":"Total Maintenances(s)","Value":0},{"Channel":"Erroneous Definition(s)","Value":0}],"text":""}}

When I enable logging .. no debug file is created..

The Configuration Report: Maintenance Windows is visible but no maintenance entries are listed

I only followed the installation steps on: https://github.com/PRTG/PRTGScheduler/wiki/1.-Installation
Question: Is an extra webserver needed for PHP?  I am running this utlility on the server running the PRTG components.

Please help!

Grtz Fred            
stephanlinke commented 6 years ago

Seemingly, the installation was done correctly. Did you already define some maintenance windows that are not reflected in the log? Did you enable the log file in PRTG? Then it should be in PRTG's data directory. As for PHP, you don't need an extra webserver, as I'm executing the index.php directly via PHP.

fredhohenstein commented 6 years ago
  1. Did you already define some maintenance windows that are not reflected in the log: ==> Yes I did, Three (3) mainenance windows are defind, only two (2) are visible by quering with the call: https://xxxx.xxxx..nl/api/table.json?content=sensors&output=jsonolumns=objid,basetype,name,device,group,status,baselink,probe,comments,parentid,probe,parent&sortby=-objid&filter_comments=@sub(maintenance)&username=prtgscheduler&passhash=xxxxxx

Maybe I made a type in the 3th maintenance deffinition..

  1. Did you enable the log file in PRTG?: ==> Do you mean logging of the sensor status/error etc? ==> This is enabled ==>
    [01.11.2018 17:59:33]|_ PHP 7.2.11 | CodeIgniter 3.1.5 | PRTG Scheduler 1.0
    [01.11.2018 17:59:33]| No sensors with configured maintenances found.
    [01.11.2018 17:59:33]| No devices with configured maintenances found.
    [01.11.2018 17:59:33]| No groups with configured maintenances found.
    [01.11.2018 17:59:33]| Maintenance list is empty, creating a new one.
    [01.11.2018 17:59:33]| Active maintenances couldn't be updated. Error: (0)
    [01.11.2018 17:59:33]| Maintenance list is empty, creating a new one.
    [01.11.2018 17:59:33]| Active maintenances couldn't be updated. Error: (0)
    [01.11.2018 17:59:33]| Maintenance list is empty, creating a new one.
    [01.11.2018 17:59:33]|__ Active maintenances couldn't be updated. Error: (0)
    {"prtg":{"result":[{"Channel":"Sensor Maintenance(s)","Value":0},{"Channel":"Device Maintenances(s)","Value":0},{"Channel":"Group Maintenances(s)","Value":0},{"Channel":"Total Maintenances(s)","Value":0},{"Channel":"Erroneous Definition(s)","Value":0}],"text":""}}

Or do yoe mean another logfile?

GRt Fred

stephanlinke commented 6 years ago

I can confirm that this seemingly is broken in the current code. I'm currently implementing this add-on in Ruby and it will most likely be a lot easier to maintain/configure/install. I hope to have a running version in the next two weeks, please bear with me for the time being :) I'll publish it here when it's ready.

fredhohenstein commented 6 years ago

Thanks for the feedback!!

Good luck and happy debugging!!

Grtz Fred

josh-stephens commented 5 years ago

Any news on this addon? Really wish PRTG would support this directly.