Custom Sensors

Custom sensors allow a number of monitoring tasks that go far beyond the standard sensor set to be performed. Apart from parameterized versions of SNMP, packet sniffer and NetFlow sensors you can create your own sensors using WQL (WMI Query Language) and by compiling an EXE file, using any Windows software development tool.

PRTG supports four custom sensor types:

Custom EXE/DLL/BAT/CMD/VBS/PowerShell and WQL Sensors

You must create the sensor as a file and place it in a specific folder on the system running the PRTG probe (i.e. if you are using remote probes the files must be copied to the remote system!):

  • Place executables (.EXE, .DLL), batchfiles (.CMD, .BAT), VBS scripts (.VBS), or PowerShell scripts (.PS1) into the "PRTG Network Monitor\Custom Sensors\EXE" subfolder.
  • Place WQL scripts (.WQL) into the "PRTG Network Monitor\Custom Sensors\WMI WQL scripts" subfolder.

You will find a sample set of demo sensors in these folders, too. As soon as a file is placed into the folders mentioned above, you can create or edit your own Custom EXE sensor or WMI Custom sensor and select the new file from the list of files.

The local probe will run the file on the local PRTG Core Server system. But for remote probes, the file will actually run on the remote system. If your custom sensor code relies on other files (eg. DLLs, .NET framework, Windows PowerShell etc.) you must copy/install these files onto the probe machine manually! The probe (either local or remote probe) will execute the file on the probe system using the user account configured for the "PRTG 7 Probe Service" (local "system" account is the default). You can change the account running this service in the Windows Computer Management console ("Services").

See Interface Definition for Custom EXE Sensors for detailed documentation. There,  you will also find information about what placeholders are allowed in the "parameter" field.

Notes

  • For PowerShell scripts, make sure that they may be executed by either code signing the files or changing the security policy for Powershell.exe accordingly.
  • The API interface for custom EXE sensors is compatible to the custom EXE sensors provided by IPCheck Server Monitor 5.
  • If you're looking for a sensor to work with scripts running on a remote web server, please see documentation for "HTTP Content" sensor (section Web Server (HTTP, HTTPS) Sensors) and also see the Paessler Knowledge Base at http://www.paessler.com/kb

Continue

Keywords: Sensor,WMI,Windows Management Instrumentation,EXE,BAT,CMD,PS1,Powershell,WQL,Custom,Program,User Defined Program,API,Application Programming Interface,How to Use Custom Sensors