This article applies as of PRTG 24


Use of Script v2 sensor sample python scripts offered by PRTG for tasks like remote monitoring and parameter usage.


Script v2 sensor example scripts

As of PRTG 23.x.82, users can add the Script v2 sensor and Python script examples to customize their monitoring.


The script files are stored in the \Custom Sensors\scripts\examples\python subfolder of the PRTG program directory on the probe system on Windows systems or in the /opt/paessler/share/doc/examples/scripts/python directory on the probe system on Linux systems.


To use the scripts, copy them to the \Custom Sensors\scripts subfolder of the PRTG program directory on the probe system on Windows systems or in the /opt/paessler/share/scripts directory on the probe system on Linux systems. On Linux system, you must also remove the .sample extension from the file name.


The following scripts are available:

Windows


Example ScriptDescription
hybrid_parameters_ping.py
A script that can be used interactively via command line and as a sensor script.
  • This script requires the ping3 package. For more information, see the script file.

dice_roll.py
A script that shows you how to take a parameter from PRTG and output the result to PRTG.
dropbox_space_free.py
A script that uses a third-party package to monitor the free space on a Dropbox file share.
  • This script requires the dropbox package.
echo_int.pyA script that shows you how to echo an integer. Use this example as a starting point for writing your own script.

 

Linux

Example Script
Description
remote_ssh_linux_network.py
A script that fetches statistics of network interfaces from a Linux system via SSH.
  • This script requires the fabric package.
remote_ssh_linux_system_load.py
A script that shows you how to monitor a remote system via SSH.
  • This script requires the fabric package.
 

You can find more information about the scripts and the requirements in the readme.md in the example script folder and in the script file themselves.