New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Monitor RSS Feed

Votes:

0

Your Vote:

Up

Down

Is it possible to monitor the RSS feeds of Amazon AWS or Office 365 for keywords? Or outage notifications?

prtg rss rss-feed

Created on Oct 2, 2013 2:46:31 PM by  Randolfini (270) 2 1



Best Answer

Accepted Answer

Votes:

1

Your Vote:

Up

Down

Got it now :) The sensor consists of three files:

Script: http://pastebin.com/aHX2RfQt
XML Configuration: http://pastebin.com/QbqppESp
Lookup File: http://pastebin.com/a713cPVS

The script goes into the EXEXML folder of the custom sensors, the configuration too. The lookupfile goes into: C:\Program Files (x86)\PRTG Network Monitor\lookups\custom

Make sure the configuration name matches the one in the script (line #14). The config itself and adding new feeds should be self explanatory. When one or more feeds get updated, you will get the latest message(s) in the sensors message field. It will then look somewhat like the screenshot:

RSS Sensir

Created on Dec 22, 2015 3:47:59 PM by  Stephan Linke [Paessler Support]



8 Replies

Votes:

0

Your Vote:

Up

Down

Hello,

thank you very much for your KB-Post. I'm afraid this may only be possible with Custom Exe/Script Sensors in the moment.

best regards.

Created on Oct 3, 2013 9:03:03 AM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi, This seems like a good suggestion. I tried to setup a http advanced sensor to monitor http://status.aws.amazon.com/rss/ec2-eu-west-1.rss and alert on changes but the rss feed updates the following causing it to be different every minute:

<pubDate>Wed, 26 Nov 2014 13:18:07 PST</pubDate> <updated>Wed, 26 Nov 2014 13:18:07 PST</updated>

It seems like the http advanced sensor is very close to being able to monitor for RSS feed changes. Is there any way to have it ignore those 2 lines?

Created on Nov 26, 2014 9:20:35 PM by  chucksalsa (0) 1



Votes:

0

Your Vote:

Up

Down

This can't be done with the HTTP Sensors (to ignore the first lines of the feed). You can do it with a custom script sensor. We have an Powershell 1 example here, that you would need to adjust to ignore the first lines of the feed:

# ___ ___ _____ ___ 
#| _ \ _ \_  _/ __|
#|  _/  / | || (_ |
#|_| |_|_\ |_| \___|
#    NETWORK MONITOR
#-------------------
# Description: This script will monitor a RSS feed for updates
# Parameters: 
# - AutoUpdate: Call the script with a sensor with autoupdate = false, let a change notification run the same script after x seconds
#  with autoupdate true to reset the sensor to okay state
# - SensorId - Set it manually _after_ the sensor creation, use %sensorid for this in the notification. This way, you can check multiple feeds :) 
# ------------------
# (c) 2014 Stephan Linke | Paessler AG

param(
[int]$autoupdate = 'false'
[string]$SensorId = '00001'
)

# RSS Reader for PRTG
$RssFeedUrl = "https://www.paessler.com"
$RssStored  = "C:\temp\rss-stored-$SensorId.tmp"
$RssLatest     = "C:\temp\rss-latest-$SensorId.tmp"

# Download the feed 
$wc = New-Object Net.WebClient 
$feedContent = $wc.DownloadString($RssFeedUrl)

# Store the feed
$feedContent | Out-File $rssLatest

if(!(Test-Path($rssStored))){
    if($autoupdate -eq 'true'){
        $feedContent | Out-File $RssStored
    }
}
    
# Get the content into xml object 
[xml]$StoredContent = get-content $RssStored
[xml]$LatestContent = get-content $RssLatest

if($StoredContent.rss.channel.item[0].title -eq $LatestContent.rss.channel.item[0].title){
    0:$StoredContent.rss.channel.item[0].title
    exit 0
}
else {
    1:"Feed updated: "$LatestContent.rss.channel.item[0].title
    exit 1
}

Please be aware that the script comes without further warranty and support.

Created on Nov 27, 2014 9:14:32 AM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello,

did somebody else test or try it? I did change the param sector and added the colon at the first line so no Parameter Error appears anymore and changed the content false to integer:

param(
[int]$autoupdate = '0',
[string]$SensorId = '00001'
)

Now the C:/temp path does not get found, although it exists and rights are open? Any ideas somebody?

Regards peet

Created on Nov 23, 2015 1:53:04 PM by  peet (0)

Last change on Nov 23, 2015 3:08:37 PM by  Torsten Lindner [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Sorry I have to revamp the script in order for it to work properly. Sorry for the sloppy code! The rewrite might take a bit, depending on my schedule.

Created on Nov 24, 2015 8:17:58 AM by  Stephan Linke [Paessler Support]

Last change on Nov 24, 2015 10:42:56 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hello Stephan,

no problem, I would do it myself, but I am more of a pseudo-coder than syntxguru, so i'll be waiting.

Did not find other code out there, so I guess a few more people would appreciate this scriptcode of yours - RSS feeds get more and more important to monitor on changes and to have a reliable probe mechanism with escalation and mailing functionalities.

Thanks a million for your efforts.

Regards peet

Created on Nov 25, 2015 8:28:40 AM by  peet (0)



Votes:

0

Your Vote:

Up

Down

Just so you know, I didn't forget you. The script is mostly done, I have to work on the updating mechanism, though :)

Created on Dec 17, 2015 11:48:01 AM by  Stephan Linke [Paessler Support]



Accepted Answer

Votes:

1

Your Vote:

Up

Down

Got it now :) The sensor consists of three files:

Script: http://pastebin.com/aHX2RfQt
XML Configuration: http://pastebin.com/QbqppESp
Lookup File: http://pastebin.com/a713cPVS

The script goes into the EXEXML folder of the custom sensors, the configuration too. The lookupfile goes into: C:\Program Files (x86)\PRTG Network Monitor\lookups\custom

Make sure the configuration name matches the one in the script (line #14). The config itself and adding new feeds should be self explanatory. When one or more feeds get updated, you will get the latest message(s) in the sensors message field. It will then look somewhat like the screenshot:

RSS Sensir

Created on Dec 22, 2015 3:47:59 PM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


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.