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

Can I use sensor "messages" to trigger content change?



I'm trying to use PRTG to monitor twitter accounts, and have got a tool generating RSS feeds of the twitter accounts I'm interested in.

I've written a PowerShell script to parse the RSS file into XML for the EXE/XML custom sensor, which successfully populates the message field of the sensor with the text of the latest tweet that account has sent.

However even with content change enabled and content change notifications enabled, if the message changes, the sensor does not trigger a content changed notification.

Is there a way of configuring this or would this have to become a feature request?


custom-sensor rss xml

Created on Apr 14, 2014 10:56:59 AM

3 Replies



Unfortunately there is no way for PRTG to compare the last message values, it can only compare values for the data that is in the sensors so in your case you would need to program this to change the data in the channel for the sensor to go into an error status.

As a side note, would you mind posting up the code that you use for this function? It seems like something that would interest our other customers :D

Created on Apr 16, 2014 2:01:26 PM by  Greg Campion [Paessler Support]



That's a shame. Given the value extracted by the query is in fact a string, is it possible to at least have the logic within PRTG notice that the string has changed, even if, because it is a string, the value reported remains at 0.

There's two ways of interrogating RSS - I used XML in the end, which I used the following parameters on: URL: URL to RSS feed XML Node: rss/channel/item[1]/description (this gives you the first entry, change the number in square brackets to pull out a different value) You need to enable 'use namespaces' on this.

The other way is using a PowerShell script as a custom EXE/XML sensor, passing the RSS URL as an argument to the script (e.g. Script.ps1 http://URLtoRSSfeed)


$url = $urlToCheck            
$wc = New-Object net.webclient            
[xml]$xml = $wc.DownloadString($url)

$retXml = "<prtg>`n"
$retXml += "<result>`n"
$retXml += "<channel>Latest tweet</channel>`n"
$retXml += "<value>",$xml.rss.channel.item[0].Title,"</value>`n"
$retXml += "</result>`n"
$retXml += "<text>",$xml.rss.channel.item[0].Title,"</text>`n"
$retXml += "<result>`n"
$retXml += "<channel>Link to latest tweet</channel>`n"
$retXml += "<value>",$xml.rss.channel.item[0].Link,"</value>`n"
$retXml += "</result>`n"
$retXml += "</prtg>"

# Return Info
write-host $retXml
exit 0

Created on Apr 17, 2014 9:28:22 AM

Last change on Apr 21, 2014 8:17:13 AM by  Greg Campion [Paessler Support]



If you use Powershell to do a string comparison and then have the number result of one of the channels change when there is a string change, you would be able to use the change trigger but unfortunately PRTG cannot compare the last message field at this time.

Created on Apr 21, 2014 8:23:07 AM 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.