New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


custom sensor: python... write to logs not output

Votes:

0

Your Vote:

Up

Down

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.

custom-sensor python write-to-log-directly

Created on Apr 22, 2019 10:30:41 PM by  chuck (0) 1



1 Reply

Votes:

0

Your Vote:

Up

Down

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

Created on Apr 24, 2019 10:10:49 AM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.