Hello,

I'm working on a custom sensor written in python. Is there a way to write directly to the log file without breaking the sensor? For instance, say I make a call to a web service and return an object. I'd like to write the returned object to the logs display without affecting the rest of the script. This would greatly aid in our troubleshooting of custom sensors we support for our own customers.


Article Comments

Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.

Why not do the logging separately instead? All sensor output (i.e. stdout) will be written to the Sensor log once "Write Result To Disk" is enabled in the Sensor settings. The log can be found in PRTGs data directory, in "Logs (Sensors)" :)


PRTGapi | Feature Requests | WMI Issues | SNMP Issues

Kind regards,
Stephan Linke, Tech Support Team


Apr, 2019 - Permalink