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

Custom Sensor Notifications

Votes:

0

I am building a custom sensor using the EXE/Script Advanced sensor. It's a PowerShell script that returns some ping, trace route, etc stats in the channels. I want to trigger a notification only is the string in the Message changes. I know the Message isn't logged so I have created a channel that is a hash of the string in Message. So if this hash changes I want a notification to trigger.

I've tried adding <NotifyChanged> to the Hash channel but that trigger a Change Notification every time the sensor runs. Any ideas how I could trigger a Notification ONLY is the Hash channel changes?

custom-notification custom-sensor json powershell

Created on Nov 17, 2017 9:50:53 AM

Last change on Nov 17, 2017 11:04:44 AM by  Luciano Lingnau [Paessler]



1 Reply

Votes:

0

Hell Dan,
thank you for your KB-Post.

PRTG will simply trigger the "change notification" when <NotifyChanged> is part of the result. You need to figure if there was a change within the script itself. For example, store the previous result to disk (write the hash to a temporary file) and then read that file again in the next run, compare the hashes and decide if the value changed and then based on this include or don't include <NotifyChanged> in the next result.

In parallel, store the "new" hash to the "cache file" to process it on the next scan.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Nov 17, 2017 12:25:20 PM by  Luciano Lingnau [Paessler]

Last change on Nov 17, 2017 12:25:31 PM by  Luciano Lingnau [Paessler]




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.