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


Missed parameters on Python advanced sensor

Votes:

0

Your Vote:

Up

Down

Hello,

I'm writing a Python Advanced Sensor that is measuring bandwidth of a device gathering data via http. It calculates the difference of a certain value and the time elapsed between each run, returning a value that is my network speed in bytes/minute.

Here https://prtg.paessler.com/api.htm?username=demo&password=demodemo&tabid=7#toc-index-3 I found a bit of documentation about the custom sensors, and in particular I'm interested in the following parameters:

Unit=SpeedNet SpeedSize=KiloByte SpeedTime=Minute

..everything looks promising, except that the PRTG python library 'paepy' does not seems to contain the SpeedSize and SpeedTime parameters! I tried adding 'manually' theese params to ChannelDefinition.py, but the remote probe seems to ignore it, so I'm wondering if the parameters in questions are deprecated/outdated or still working.

I'd like to display my bandwidth as the "Windows Network Card" sensor does (Mbit/s), but I'm not able to reproduce it! Why?

Thanks

custom-sensor prtg python

Created on Jan 22, 2018 2:20:26 PM by  aventrax (0) 1



3 Replies

Votes:

0

Your Vote:

Up

Down

Dear aventrax,

about the ignored addition on the remote probe: Did you change the file on the remote probe as well, or on the core server only?

Created on Jan 23, 2018 2:16:14 PM by  Arne Seifert [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I modified 'ChannelDefinition.py' on my IDE where I imported the paepy module, then on the remote probe on C:\Program Files (x86)\PRTG Network Monitor\Python34\Lib\site-packages\paepy\ . I did not restarted the remote probe services.

Anyway, from your answer it seems that the settings are still valid, isn't it? Why the paepy library does not contain the parameters by default?

Thanks

Created on Jan 23, 2018 2:23:57 PM by  aventrax (0) 1



Votes:

0

Your Vote:

Up

Down

Dear aventrax,

returning the unit scale factors with a custom sensor result is only rarely done, so it was not implemented in the default channel lib. If a modified ChannelDefinition.py file does not work, please create the XML (or JSON) output directly, as string, in order to print it to the console.

Created on Jan 23, 2018 8:12:38 PM by  Arne Seifert [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.