Some techy stuff and occasional verbose ramblings :D

Windows and Powershell

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 Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Theme by Anders Norén