This article applies as of PRTG 15


I want to send notifications about alarms in PRTG to the messaging app Slack. How can I do this?


Note: As of PRTG 18.3.42, PRTG comes with native Slack integration out of the box.


Sending notifications from PRTG to a Slack channel

PRTG provides various options to notify you about alarms in your network. The most common ones are emails, SMS text messages, and push notifications, but you can also create custom notifications. For example, write a small program that PRTG executes if a notification is triggered. This way it is possible to perform an action like a service restart, or you can get notifications on almost any platform (as long as this platform provides some access like a public API).

Custom script for notifications to Slack

One of our customers created a PowerShell script that PRTG can use to show notifications in your Slack channel. PRTG can execute the script in case of alarms in your network using the notification type Execute Program. Each time the notification is triggered, PRTG runs this script which sends then the notification to Slack, using the Slack API. This way, you can see any alarms in PRTG which trigger a notification in the defined Slack channel.

Using Slack notifications in PRTG

The customer provides two scripts on GitHub for using PRTG notifications with Slack:

  • PRTGSlackNotification.ps1 uses a user token that you can find on the Slack Web API page.
  • PRTGSlackWebHookNotification.ps1 uses a web hook that you can define on the WebHook page in your Slack account.

Decide which method you prefer and follow the steps below:

  1. Download the script depending on your desired method.
  2. Save the script file into the \Notifications\EXE subfolder of your PRTG installation.
  3. Create a new notification in PRTG and choose the script from the Program File list in section Execute Program.
  4. Adjust the Parameter field as documented on GitHub, depending on the script you use.
  5. Add triggers that use this notification.

For detailed instructions, please see WCOMAB/PRTGSlackNotification on GitHub. Thank you WCOM AB for sharing the scripts!

Note: Please understand that we cannot provide any support for custom notifications.


Disclaimer:
The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.