Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check correct working of PHP?? #18

Open
fredhohenstein opened this issue Oct 31, 2018 · 5 comments
Open

Check correct working of PHP?? #18

fredhohenstein opened this issue Oct 31, 2018 · 5 comments

Comments

@fredhohenstein
Copy link

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
Copy link
Collaborator

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
Copy link
Author

  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
Copy link
Collaborator

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
Copy link
Author

Thanks for the feedback!!

Good luck and happy debugging!!

Grtz Fred

@josh-stephens
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants