What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How can I use the push notification application "ntfy" with PRTG?

Votes:

0

I'd really like to use the free push notification service ntfy with PRTG, is there some easy way to do this? https://ntfy.sh/

Also, I'd like to monitor my ntfy instance to make sure it's up and running, is that possible?

diy free notifications prtg push-notifications script

Created on Jan 18, 2024 5:10:28 PM by  Greg Campion [Paessler Support]

Last change on Jan 18, 2024 9:55:15 PM by  Greg Campion [Paessler Support]



1 Reply

Votes:

0

Using the script below, you can use the script notification with the following parameters to send a notification through the ntfy service.

Parameters

NTFY_ENDPOINT "[%sitename]" "%device" "%name" "%status" "%down" "(%message)"

Script (Powershell)

$ntfy_url = $args[0]

$site = $args[1]
$device = $args[2]
$name = $args[3]
$status = $args[4]
$down = $args[5]
$message = $args[6]

$pushMessage = @"
Site: $site
Device: $device
Name: $name
Status: $status
Down: $down
Message: $message
"@

Invoke-WebRequest -Uri $ntfy_url -Method POST -Body $pushMessage

If you are hosting your own ntfy server, you can also make sure it's up and running by setting up a REST Custom v2 sensor. The following settings work to show if it's up or down:

Request URL: NTFY_URL/v1/health

Channel #1 JSONPath/XPath: $.healthy

Channel #1 Value Type: Status (string)

Channel #1 Strings mapped to the 'Up' status: true

Created on Jan 18, 2024 9:36:16 PM by  Greg Campion [Paessler Support]

Last change on Jan 22, 2024 4:57:30 PM by  Greg Campion [Paessler Support]




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.