New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


How do I create a webhook for the PRTG Notifications to Slack and Microsoft Teams?

Votes:

1

Your Vote:

Up

Down

To get notified via Slack or Microsoft Teams, I need to provide a webhook in the PRTG notification settings. How do I get webhooks for Slack and Microsoft Teams?

microsoft-teams notifications prtg slack webhook

Created on Jun 19, 2018 4:06:59 PM by  Martina Wittmann [Paessler Support]

Last change on May 22, 2019 6:31:01 AM by  Maike Behnsen [Paessler Support]



7 Replies

Accepted Answer

Votes:

1

Your Vote:

Up

Down

This article applies to PRTG Network Monitor 19 or later

How to Configure Webhooks for PRTG Notifications to Slack and Microsoft Teams

To communicate with your messaging application, PRTG needs an address to send the notification information to. This address is the URL of the webhook that you need to provide in the Slack or Microsoft Teams notification setup in PRTG under Setup | Account Settings | Notifications.

The webhook URL is created upon request by your messaging application. Go to your Slack or Teams workspace and create a webhook for your channel.

How to Create a Webhook for Slack

  1. In your Slack app, go to the settings page and follow the instructions from the Slack API documentation Incoming Webhook.
  2. Copy the Slack webhook and paste it in the URL of Slack Webhook field of your Slack notification settings in PRTG.

This is what a Slack notification sent by PRTG may look like:

An Example PRTG Message in Slack
Click to enlarge.

How to Create a Webhook for Microsoft Teams

  1. In your Microsoft Teams app, go to the More options … settings of a channel. Then follow the instructions that you find in the Microsoft Teams documentation Setting up a custom incoming webhook.
    Note: If incoming webhook is not available as connector, make sure to enable the option Allow external apps in Microsoft Teams. See Prepare your Office 365 tenant for more information.
  2. Copy the Teams webhook and paste it in the URL of the Teams Webhook field of your Teams notification settings in PRTG.

This is what a Teams notification sent by PRTG may look like:

An Example PRTG Alarm Message in Microsoft Teams
Click to enlarge.

More

Created on Jul 2, 2018 8:39:53 AM by  Martina Wittmann [Paessler Support]

Last change on Jul 25, 2019 5:27:22 AM by  Maike Behnsen [Paessler Support]



Votes:

1

Your Vote:

Up

Down

This looks nice, any chance of also supporting Webex Teams? It also has incoming webhook support (see https://bit.ly/2LMAdvY) so should be fairly similar.

Created on Aug 3, 2018 9:26:47 AM by  islands (10)



Votes:

0

Your Vote:

Up

Down

Hi there,

You can use the "HTTP Action" in the Notifications under "Setup > Account Settigns > Notifications" for almost all HTTP-APIs. I don't see a reason why you wouldn't be able to send a notification to Cisco Webex as the Calls are simple HTTP Calls.

Best regards.

Created on Aug 3, 2018 9:29:32 AM by  Dariusz Gorka [Paessler Support]



Votes:

2

Your Vote:

Up

Down

I created a method to send notifications to WebEx Teams, here's how:

1) Create a WebEx Teams webhook space and note the space's number

2) On the PRTG server, copy/paste the code below into C:\Program Files (x86)\PRTG Network Monitor\Notifications\EXE\webex-teams-notification.ps1

#
# Notification trigger for PRTG to send notifications to a WebEx Teams space
#
# Usage: webexteams-notifications.ps1 <WebEx Teams space number> <message from PRTG>
#

# The next line receives all command line args and splits out the first arg as $teamsSpace and shifts the array so all remaining
# args are assigned to $teamsMessage, as this can vary in number of elements.
# See: https://devblogs.microsoft.com/powershell/powershell-tip-how-to-shift-arrays/
$teamsSpace, $teamsMessage = $args
# URL to send the message to
$teamsUri      = "https://api.ciscospark.com/v1/webhooks/incoming/$teamsSpace"

# Where the magic happens
Invoke-WebRequest -Method 'POST' -ContentType "application/json" -Body "{`"text`" : `"$teamsMessage`"}" $teamsUri

3) In the PRTG web interface, go to Setup -> Account Settings --> Notification Templates, then select Add Notification Template

4) Give it a user-friendly name, then scroll down and toggle Execute Program and select the PowerShell script you created in step #2

5) Leave the existing Parameters values, but pre-pend the Team space number to be the first value

6) Select Create

7) Apply the new notification template to whatever PRTG object you'd like

8) Test it out, then feel #accomplished

Created on Oct 22, 2019 3:05:50 PM by  ryebread157 (20)



Votes:

1

Your Vote:

Up

Down

Hi there,

Thanks a lot for sharing this. We appreciate your work.


Kind regards,
Birk Guttmann, Tech Support Team

Created on Oct 22, 2019 4:31:07 PM by  Birk Guttmann [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi ryebread157,

thanks for your afford to create this code! We tried to enable this for our Webex Teams as well, but sadly it is not working. Maybe we are making a mistake... Can you maybe get a little bit more specific on step 5?

Thanks in advance!

Created on Nov 20, 2019 12:18:30 PM by  klemensfliri (0)



Votes:

0

Your Vote:

Up

Down

Just wanted to add to this as I found I was having trouble calling an Azure webhook and eventually realised the issue was that the built-in option only supports HTTP and I needed to make the call on HTTPS.

I've added the following script as C:\Program Files (x86)\PRTG Network Monitor\Notifications\EXE\Webhook.ps1:

param (
    [Parameter(Mandatory=$true,Position=0)][String]$Token
)

$Domain = "https://s12events.azure-automation.net/"
$Uri = ($Domain + "webhooks?token=" + $Token)

Invoke-Webrequest -Method POST -Uri $Uri

I've then put the token in the comments for the "Device" and so can pass it through as an argument as per this screenshot. This now successfully calls the Azure webhook and I've been able to apply it to multiple sensors.

Created on Dec 12, 2019 3:15:59 PM by  Ross McLachlan (0) 1



Please log in or register to enter your reply.


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.