Really simple PRTG and Pushover integration using Powershell

Recently I had to write a script that will send PRTG notifications via Pushover to the admins on call.
It turned out, the script itself is very, very simple.

Powershell script:

$step=$args | out-string
$uri = ""
$parameters = @{
token = "YourToken"
user = "PushoverUserdID"
message = "$step"
echo $parameters | out-file c:\work\pushover.txt
$parameters | Invoke-RestMethod -Uri $uri -Method Post

After you have the script, all that’s left to do is to configure PRTG parameters in the “Notifications” section.
It’s helpfull to define two notifications, one for sensor “UP” and one for sensor “Down”.

Here’s an example:

' :white_check_mark: %device - %sensor is %status! Last message: %message'

Hope it will be usefull so someone.


Leave a Comment

Your email address will not be published. Required fields are marked *