Hi,

We are adapting our Python to run on a PTRG Python Sensor, and first of all I tried to see the result of the example.py script , so I can use the same methods on out when we run it on PRTG Python environment via command Prompt on (C:\Program Files (x86)\PRTG Network Monitor\python\Scripts>).

First It was missing the file with the libs "prtg.sensor.result" and "prtg.sensor.unit". I found some related issues on Paessler KB, so i copied the prtg folder on "C:\Program Files (x86)\PRTG Network Monitor\python\Lib\site-packages" to the same folder where the example script is, but now I´m facing the error:

File "C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\python\prtg\sensor\result.py", line 52 _channels: list = [] ^ SyntaxError: invalid syntax

Ps: This example.py script is not commented, it would be helpful


Article Comments

Hi,

please open a support ticket, so that we can take a closer look on your issue. Please refer to this KB article, when you open the ticket.


Kind regards,
Matthias Kupfer - Team Tech Support


Nov, 2020 - Permalink