tag:blogger.com,1999:blog-873374391134593257.post2952531619951770396..comments2024-03-10T14:57:49.397-04:00Comments on John Wesorick: Nagios Plugin - check_rssJohn Wesorickhttp://www.blogger.com/profile/09131376861666358136noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-873374391134593257.post-79586909680324296962023-03-10T07:33:05.346-05:002023-03-10T07:33:05.346-05:00awesome plugin. thanks!awesome plugin. thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-40064878428926402802018-08-14T12:30:46.481-04:002018-08-14T12:30:46.481-04:00On line 131: "for search in criticalnot"...On line 131: "for search in criticalnot", this seems to have changed from v0.30, where it as "for search in warningnot" - that seems to be a bug? Also, do you have this somewhere where we can submit a CR, e.g. github, etc? I see e.g. https://github.com/jrottenberg/check_rss but I'd like something canonical.Justin Killenhttps://www.blogger.com/profile/01917391778460988555noreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-44411799621584364872015-01-21T10:05:00.859-05:002015-01-21T10:05:00.859-05:00Hmmm. It doesn't look like feedparser (the lib...Hmmm. It doesn't look like feedparser (the library I'm using to parse the feeds) supports that. But all hope is not lost. The only way I can think of doing this would be to remove lines 55 & 56:<br /> if ( rssfeed.find('http://') != 0 ):<br /> rssfeed = 'http://{rssfeed}'.format(rssfeed=rssfeed)<br />Then, create a cronjob that will download the feed every X amount of minutes (whatever your check interval in Nagios is) via wget. Then point the plugin at the downloaded file location instead of the URL of the feed. Untested, (and a little hacky) but that *should* work.John Wesorickhttps://www.blogger.com/profile/09131376861666358136noreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-8509896523728519092015-01-20T12:20:13.029-05:002015-01-20T12:20:13.029-05:00Hello, it looks awesome but I didn't ahd to ch...Hello, it looks awesome but I didn't ahd to chance o try it, as the service in question,only delivers the rss via https with a selfsigned certificate, platform owner refuse to change that, and as I am one heck of python noob, what can be done to to retrieve the rss via https like wget with --no-check-certificate. Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-18501217056774666692014-03-24T09:49:56.327-04:002014-03-24T09:49:56.327-04:00I patched this script to make it work for the inve...I patched this script to make it work for the inverse case, i.e. you want to check that the items in the feed are not older than a certain time. <br />https://github.com/denisbr/nagios-plugins/blob/master/check_rssDenishttps://www.blogger.com/profile/06897198777409544143noreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-61467893860621575702014-03-13T10:49:09.694-04:002014-03-13T10:49:09.694-04:00If you look at the RSS feed, the most recent post ...If you look at the RSS feed, the most recent post in the RSS feed was a year ago. Most status RSS feeds only post when there is something wrong, then an "all clear" message. They don't continually post "all clear" messages. So don't worry, that's a good thing. It just means there hasn't been any issues in a year.John Wesorickhttps://www.blogger.com/profile/09131376861666358136noreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-9799807070548132932014-03-13T06:39:09.554-04:002014-03-13T06:39:09.554-04:00 ./checknew_rss --hours 145 -H http://status.aws.a... ./checknew_rss --hours 145 -H http://status.aws.amazon.com/rss/s3-us-west-2.rss<br />OK - Posted 10301 hrs ago ; Title: Service is operating normally: [RESOLVED] Increased error rates in Amazon S3 ; Description: Error rates have returned back to within normal ranges. The service is operating normally. ; Link: http://status.aws.amazon.com<br /><br /><br />How is that saying 10301 hrs ago? Is that right one. I believe script is telling that the site was last updated 10301 hrs agoaravcindhttps://www.blogger.com/profile/15464828889633022191noreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-21355956179888697402014-02-25T06:16:38.136-05:002014-02-25T06:16:38.136-05:00Typo correction:
ln -s /usr/lib/python2.4/site-pa...Typo correction:<br /><br />ln -s /usr/lib/python2.4/site-packages /usr/lib/python2.4/site-packages<br /><br />should be<br /><br />ln -s /usr/lib/python2.4/site-packages /usr/lib/python2.6/site-packagesAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-90561360783147538162014-02-25T06:15:19.898-05:002014-02-25T06:15:19.898-05:00I had similar issue with older CentOS 5 monitoring...I had similar issue with older CentOS 5 monitoring system that I didn't want to upgrade just to get use this plugin. I got around the Python2.6 dependency as follows:<br /><br />Install python-feedparser, python-argparse and python26 using the EPEL repo. Python 2.6 will install to /usr/bin/python26<br /><br />The problem here is that python26 will not find the modules, as they are installed for python 2.4<br /><br />To get around this, remove the /usr/lib/python2.6/site-packages directory and create a symlink to /usr/lib/python2.4/site-packages<br /><br />ln -s /usr/lib/python2.4/site-packages /usr/lib/python2.4/site-packages<br /><br />You will get a few warning, which you can suppress, but the script will work. You just need to edit the first line to use /usr/bin/python26 instead of /usr/bin/pythonAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-9305224685642999332014-02-25T05:31:13.687-05:002014-02-25T05:31:13.687-05:00I think you need Python V2.6 at a minimum, which m...I think you need Python V2.6 at a minimum, which may not be present on RHEL5.9Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-37456078082081198792013-10-25T04:05:57.354-04:002013-10-25T04:05:57.354-04:00Was just what I was looking for, many thanks. Wou...Was just what I was looking for, many thanks. Would be nice to be able to set an expiry though, otherwise the nagios alert will remain until a new RSS entry is published that does not match?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-51762121035324490522013-02-26T13:46:21.323-05:002013-02-26T13:46:21.323-05:00I seem to be getting errors running this on RHEL5....I seem to be getting errors running this on RHEL5.9. Any idea what might be the issue?<br /><br /># ./check_rss -H http://www.webhelpdesk.com/feed/<br />Traceback (most recent call last):<br /> File "./check_rss", line 160, in ?<br /> result = main(sys.argv)<br /> File "./check_rss", line 81, in main<br /> output = ': Posted {hourssinceposted} hrs ago ; Title: {title} ; Description: {description} ; Link: {link}'.format(hourssinceposted=hourssinceposted, title=title, description=description, link=link)<br />AttributeError: 'str' object has no attribute 'format'<br />Anonymoushttps://www.blogger.com/profile/04742475902931406842noreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-60204354139190850632012-07-02T04:39:32.580-04:002012-07-02T04:39:32.580-04:00Very cool plugin ! Very handy. I've tweaked it...Very cool plugin ! Very handy. I've tweaked it a bit to support empty feeds (which in our context is VERY good to have, ie the less I hear about my provider the better)<br /><br />Using : http://status.aws.amazon.com/rss/s3-us-west-2.rss<br /><br /><br />~/git/check_rss/ ±|master| (test) $ ./check_rss_john.py -T 1 -H http://status.aws.amazon.com/rss/s3-us-west-2.rss<br />CRITICAL: Could not parse URL (http://status.aws.amazon.com/rss/s3-us-west-2.rss)<br /><br /><br />Patched version<br />~/git/check_rss/ ±|master| (test) $ ./check_rss.py -T 1 -H http://status.aws.amazon.com/rss/s3-us-west-2.rss<br />OK - No news == good news<br /><br /><br />See the source at https://github.com/jrottenberg/check_rss/blob/master/check_rss.pyAnonymoushttps://www.blogger.com/profile/18209277127243497062noreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-32777994908786818692012-06-15T10:41:31.662-04:002012-06-15T10:41:31.662-04:00Awesome plugin! Thanks for taking the time to wri...Awesome plugin! Thanks for taking the time to write and publish it!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-53933495682759581372012-03-02T22:02:20.022-05:002012-03-02T22:02:20.022-05:00John
Thanks for your response. I apologize for t...John<br /><br />Thanks for your response. I apologize for the confusion. I actually need help with the "check_cap" plugin. I did not get a response from Tony Yarusso and came across your nice plugin with similar concept. So I thought I should ask your help on getting the "check_cap" work with a Nagios Core instance. There is no instruction on how to setup the plugin anywhere I can find. I would greatly appreciate any help from you to get this plugin work on Nagios core (v3.3.1). Is there any contact email I can use to email you my environment?<br /><br />Thanks again.<br /><br />MarkMarknoreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-89967793400977054262012-03-01T13:59:58.160-05:002012-03-01T13:59:58.160-05:00@Mark, thanks for your interest! I'm confused,...@Mark, thanks for your interest! I'm confused, do you need help with the check_cap plugin, or my check_rss plugin? If you're having trouble with the check_cap plugin, you'd have better luck contacting the author of that plugin, <a href="http://tonyyarusso.com" rel="nofollow">Tony Yarusso</a>.John Wesorickhttps://www.blogger.com/profile/09131376861666358136noreply@blogger.comtag:blogger.com,1999:blog-873374391134593257.post-59534104658723542542012-02-28T22:58:49.501-05:002012-02-28T22:58:49.501-05:00John,
I like the RSS check idea. Have you ever s...John,<br /><br />I like the RSS check idea. Have you ever seen a nagios plugin called: "check_cap". I have a working Nagios instance and actively monitoring hosts without any problem. But I can't get the above plugin to work. I was wondering if you could take a look at this and see if you can make it work. Here is the URL containing code:<br /><br /> http://files.tonyyarusso.com/check_cap<br /><br />More info:<br /><br />http://exchange.nagios.org/directory/Plugins/Others/check_cap-3A-check-Common-Alerting-Protocol-feeds/details<br /><br />I would greatly appreciate your input.<br /><br />Thanks<br /><br />MarkMarknoreply@blogger.com