Users can create and use their own, self-written custom sensors in PRTG Network Monitor to go far beyond PRTG's standard sensor set. You can create your own sensors using WQL (WMI Query Language), PowerShell, batch scripting and by compiling an EXE or DLL file (using any Windows software development tool).
Basics
The following webpages serve as a good introduction for custom sensors:
Sensors coming with PRTG Network Monitor
After installing PRTG Network Monitor you will already find a selection of custom sensors on your disk. Many of these are sample projects that you can edit and improve for your needs:
Folder: PRTG Network Monitor\custom sensors\EXE
- Demo Batchfile - Returns 200.bat
- Demo Cmd - Returns 200.cmd
- Demo Dll - Returns a random integer.dll
- Demo EXE - Returns a random integer.exe
- Demo EXE - Returns number of files in folder (parameter).exe
- Demo Powershell Script - Available MB via WMI.ps1
- Demo Powershell Script - InterruptsPerSec via WMI.ps1
- Demo Powershell Script - Returns a fixed integer value.ps1
- Demo Powershell Script - Returns a random integer value.ps1
- Demo Powershell Script - Returns Random Integer and Warnings.ps1
- Demo VBScript - InterruptsPerSec via WMI.vbs
- Demo VBScript - Returns a fixed float value.vbs
- Demo VBScript - Returns a fixed integer value.vbs
- Demo VBScript - Returns a random value.vbs
- Load_Test_CPU_10_Mio_Primes.exe
- Load_Test_CPU_1_Mio_Primes.exe
- Load_Test_Disk_Write_Read_10000_files.exe
- Load_Test_Disk_Write_Read_1000_files.exe
- Load_Test_Memory_Allocate_And_Free_400MB.exe
To create a new sensor based on one of these files, create a new "Custom EXE/Script" sensor and choose the respective file from the drop down list.
Folder: PRTG Network Monitor\custom sensors\WMI WQL scripts
- Demo WQL Script - Get Win32LogicalDiscFreeMB.wql
- Demo WQL Script - Get Win32OsBuildnumber.wql
- Demo WQL Script - Get Win32PercentProcessorIdleTime.wql
- Demo WQL Script - Get Win32PercentProcessorTime.wql
To create a new sensor based on one of these files, create a new "WMI Custom" sensor and choose the respective file from the drop down list.
Downloading Pre-Build Custom Sensors
A good resource the prtg7addons website on the open source platform Google Code.
Sensors available on prtg7addons are (among others):
- CheckPRTGVersion: compares your local PRTG version number with the last version available for download and go’s into a warning state if a new version is available.
- FTPFileCount: returns the number of files available on a FTP server.
- NetworkFileCount: returns the number of files available on a server\share.
- LogFileReader: returns whether a specified string occurs in a (log) file.
- EmailCount: returns the total number of messages in a users inbox.
The Wiki has more details. The files can be download from the Downloads page.