What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Python Sensor

Votes:

0

Is there any documentation on the parameters you can pass to a python sensor

So far I have got......

password = data['linuxloginpassword']
host = data['host']
username = data['linuxloginusername'] 

I would guess there should be one more, for the additional parameters field in the sensor?

custom-sensor prtg python sensor

Created on Feb 13, 2017 8:41:54 PM

Last change on Feb 14, 2017 6:39:41 AM by  Luciano Lingnau [Paessler]



7 Replies

Votes:

0

Hi there,

You can use almost all placeholders that are described in this site.

What specific parameters do you need to pass to the Python script?

Created on Feb 14, 2017 8:25:43 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

The one that I'm not finding, is the "additional paramaters" when you look at the settings of the custom python sensor.

I want to pass a variable into the sensor from that box, but not finding what the placeholder for that field.

Created on Feb 14, 2017 12:38:50 PM



Votes:

0

Hi,

Please see the screenshot below: python

Do you have this field too? If not, what version of PRTG are you currently using and what exact sensortype?

Created on Feb 14, 2017 1:09:19 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

yep that's the field I'm asking about.

I want to use that to pass in a custom list into my python sensor

Created on Feb 14, 2017 1:17:29 PM



Votes:

0

Hi there,

Then just enter your necessary parameters into that field. ^^ I am quite unsure what the current question is, as you have the field and you are able to enter parameters. So to pass the IP-Address or Hostname of the parent device, just add: -host "%host" Just make sure that the python script can take and interpret the "-host" parameter.

Created on Feb 14, 2017 1:23:45 PM by  Dariusz Gorka [Paessler Support]



Votes:

2

Hi Kube,

Not sure if you recieved an answer to this but I believe all the parameters you can pass from Python can be found in your logs

  • 1. You need to first run a python sensor to produce the data.
  • 2. You must turn on "Write sensor results to disk"
  • 3. Location of the logs can be found here.
    • C:\ProgramData\Paessler\PRTG Network Monitor\Logs (Sensors)
    • Example: Result of Sensor 5036.Data.txt
  • 4. Options such as "Pass the Device Credentials" will update this parameter list.

The parameters you can pass can be found in the following. (I purposly removed all my sensitive data)

Data['blockedsens'].asString := ''
Data['canlinux'].asString := '1'
Data['checkfailed'].asString := '0'
Data['cookies'].asString := ''
Data['crc'].asString := '0'
Data['customheaders'].asString := ''
Data['fastcount'].asString := '0
Data['host'].asString := '#########'
Data['hostv6'].asString := ''
Data['httpauthentication'].asString := ''
Data['httpmethod'].asString := 'GET'
Data['httpmustneeded'].asString := '2'
Data['httpmustnotneeded'].asString := '0'
Data['httppassword'].asString := '***'
Data['httpurl'].asString := '########'
Data['httpuser'].asString := ''
Data['hybridmode'].asString := 'delphi'
Data['includemaynot'].asString := ''
Data['includemaynottype'].asString := '0'
Data['includemaynotwarning'].asString := ''
Data['includemust'].asString := '#######'
Data['includemusttype'].asString := '0'
Data['includemustwarning'].asString := ''
Data['inerror'].asString := '0'
Data['interfacenumber'].asString := ''
Data['inum'].asString := ''
Data['ipversion'].asString := '0'
Data['isexesensor'].asString := '0'
Data['lastmsg'].asString := '#P1'
Data['lastuptime'].asString := '0'
Data['maxdownload'].asString := '0'
Data['monitorchange'].asString := '0'
Data['notonpod'].asString := '0'
Data['port'].asString := ''
Data['postcontentoptions'].asString := '0'
Data['postcontenttype'].asString := 'application/x-www-form-urlencoded'
Data['postdata'].asString := ''
Data['protocolversion'].asString := '1'
Data['proxy'].asString := ''
Data['proxypassword'].asString := '***'
Data['proxyport'].asString := '###'
Data['proxyuser'].asString := ''
Data['reboot'].asString := '42823.7710075926'
Data['reqmsginterval'].asString := '3600'
Data['resultfile'].asString := 'Result of Sensor 5036.txt'
Data['sensorid'].asString := '5036'
Data['simulate'].asString := '0'
Data['sni_inheritance'].asString := '0'
Data['snihost'].asString := '
Data['timeout'].asString := '60'
Data['tlsexplicit_default'].asString := ''
Data['tlsexplicit_ftp'].asString := ''
Data['tlsexplicit_imap'].asString := ''
Data['tlsexplicit_pop3'].asString := ''
Data['tlsexplicit_port'].asString := ''
Data['tlsexplicit_smtp'].asString := ''
Data['tpaesslconnection_owned'].asString := ''
Data['tpaesslconnection_step'].asString := '0'
Data['uptimecount'].asString := '0'
Data['usednstime'].asString := '0'
Data['useragent'].asString := 'Mozilla/5.0 (compatible PRTG Network Monitor (www.paessler.com) Windows)'

Created on Apr 19, 2017 7:32:59 PM

Last change on Apr 20, 2017 5:39:55 AM by  Luciano Lingnau [Paessler]



Votes:

0

Hi Jeffrey,

Thank you for your additional explanation. Upvote. :)

Best regards.

Created on Apr 20, 2017 9:03:28 AM by  Dariusz Gorka [Paessler Support]




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.