PRTG Manual: Custom Notifications
In addition to the various standard methods for notifications, you can also define your own notifications that can trigger desired actions. The possibilities of these notifications go far beyond just sending out messages, because you can perform almost any action you like whenever the notification is triggered.
The following documentation describes these custom notifications. Different notification methods can also be combined in one notification.
For more general information about notifications based on email, messaging, and others, see section Notifications.
This notification method executes a GET request or sends any POST, PUT, or PATCH data to a custom URL. You can execute specific actions on a web server or control any web service that accepts commands via one-time HTTP requests. Whenever a notification of this kind is triggered, the HTTP action is sent.
With this method, you can also call any API function of the PRTG web interface. For example, you can set PRTG to automatically pause a sensor, or acknowledge an alarm.
To automatically pause the sensor that triggers the notification, enter the following HTTP action:
To use the notification to automatically acknowledge the alarm that triggered it, enter this HTTP action:
With this notification method, you can execute a script or a program as an external process. It can be a Windows executable file or a BAT, CMD, or PowerShell file. You can use EXE, COM, BAT, CMD, VBS, or PS1 files.
You must create the notification as a file and place it in a specific folder on the PRTG core server system (in a cluster, copy the files to every node).
Place executables (.EXE, .COM), batch files (.CMD, .BAT), VBS scripts (.VBS), or PowerShell scripts (.PS1) into the folder:
As soon as a file is placed into the folder, you can create or edit your own custom execute program notification and select the new file from the list of files. You can also enter start parameters and use PRTG placeholders for this.
- PRTG will execute the file on the local PRTG core server system using the account configured for the PRTG core server service ("system" is the default).
- If your custom notifications code relies on other files (for example, DLLs, .NET framework, or Windows PowerShell), you must copy/install these files on the PRTG core server machine manually!
- Make sure the return code of the executable is 0 (zero). Otherwise PRTG assumes something went wrong with the notification and will try to send it up to 3 times.
- When running PRTG in a cluster, copy the respective files to every single node to make sure the notification also works when the primary master is not reachable.
- EXE notifications will fail if they attempt to open any graphical user interface windows using the Win32 APIs (this is not allowed for processes that are started by a system service).
For more information about the placeholders you can use, see the Paessler Knowledge Base What placeholders can I use with PRTG?
Find useful scripts for custom notifications in the PRTG Script World, written by dedicated PRTG customers around the world and Paessler!
For more information about custom notifications, see the Paessler Knowledge Base, tag-set "custom-notification".