This article applies as of PRTG 23
Script v2 sensor example scripts
Updates as of PRTG 23.x.82 contain the Script v2 sensor and four example Python scripts for the sensor.
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 /var/local/prtg/scripts/examples/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 /var/local/prtg/scripts directory on the probe system on Linux systems. On Linux system, you must also remove the .example extension from the file name.
The following scripts are available:
- hybrid_parameters_ping.py: A script that can be used interactively via command line and as sensor script.
- This script requires the ping3 package. For more information, see the script file.
- dice_roll.py: A simple example 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.
- 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.