I’ve written some sample code to generate a RSS feed from the Windows Event Logs. This is very handy for monitoring servers – perhaps a poor man’s SNMP monitor. :-)
Here’s an screen shot showing it in NewsGator (click for larger version):
You can specify in the URL how many entries to return, and which logs to use. For example,
http://example.org/Rss.aspx?num=20&logs=Application,System
would return the 20 most recent entries, looking in both the Application and System event logs.
Download here – requires ASP.NET. If your server is on the internet rather than local, try it with my HTTP security samples [Basic, Digest] to securely monitor the event log of the remote server – very handy for those hosting on remote, dedicated servers.
RSS rules…[more]
Brilliant thinking!
The possibilites for RSS are vast. Now that NewsGator allows access to feeds from within Outlook, I suspect that we’ll begin to see a proliferation of all sorts of information being generated and availiable from within Outlook. This may be both good and bad. Hmm… Maybe we’ll even see outlook turned into the desktop environment itself. ;-)
K.C.
CarterWorld
How about getting Newsgroups as RSS feed too, Usenet, Oh, how about getting MSDN newsgroups as feeds?
Yeessss…. more….
K.C.
CarterWorld
Interesting thought about newsgroups and RSS. As you know, we provide RSS feeds for the NewsGator forums, and hopefully other discussion forums will follow suit – it’s been extremely helpful for us.
But interestingly, while there is a RSS to NNTP converter, I haven’t seen anyone doing a NNTP to RSS converter which would allow reading usenet news feeds with a RSS reader. Not sure I’d want to read them that way, but heck…it’s worth a try. This would be pretty trivial to build, especially if one used something like /n software’s NNTP component. Anyone?
If anyone starts working on one of these, post something here – otherwise, I might throw a little code together and see what I can come up with.
Greg,
I would love to see you incorporate as a feature of Newsgator, where in the subscritions menu a user could put in the name of a usenet newsgroup and receive it as a feed. That would be the “icing on the cake” extending and setting NewsGator in a new catagory (again) of RSS readers.
K.C.
CarterWorld
I can see RSS => NNTP, but not the other way around. RSS is a bunch of one way flow. NNTP is a two way flow. If you bridged your Usenet groups into RSS, it would be read only. Where’s the value in that?
At least one competetive product offers full NNTP support. It seems like fully supporting NNTP would be a better use of time than working on an NNTP => RSS bridge. That is, if there’s enough call for it.
A fair point, Brad…although I do wonder if a one-way RSS feed of a NNTP newsgroup might still be useful. Probably no way to tell without trying it. :-)
As for the full two-way NNTP support, I don’t know if we’ll integrate that (since everyone who has Outlook has at least one NNTP reader already), but if there’s enough demand, you never know…
We are considering adding the ability to read NNTP newsgroups into NewsGator in a read-only manner…[more]
Event Log Monitoring with RSS…[more]
Event Log / NNTP RSS…[more]
RSS …[more]
I think we should expand the scope of this just a bit, from “online journals or weblogs” to “syndicated content”. There are a lot of interesting applications of syndicated content that have nothing to do with journals or weblogs…[more]
Love the EventLog to RSS feed example! Very cool and extremely handy for some servers I have at work.
One question:
The line:
w.WriteElementString(“link”, “http://example.org/viewlog.aspx?n=” + Server.UrlEncode(entry.LogName) + “&i=” + entry.Entry.Index);
builds a link that looks like this:
http://myhost/viewlog.aspx?n=Application&i=8658
but (I am so DIM) I don’t see a facility to return a specific entry by ID. Am I missing something, or am I as dim as I think I am?
Thanks again!
-jlw
You’re not dim – if you wanted to be able to see a specific entry, you’ll need to write the code to do so. That was left as an exercise for the reader. :-)
Should try this on MWEBSTAGE7? Greg Reinacker’s Weblog – Event Log Monitoring with RSS…[more]
Greg Reinacker’s making the Windows Event Log available as RSS….[more]
…[more]
Way to go. Truly shows off the power of RSS. Excellent work…
…[more]
…[more]
…[more]
…[more]
Pingback
KC Lemson post about eventlogs to rss sounded interesting as it would be nice to sit and my desk and watch the eventlogs roll in as emails – I’d stand a better chance of catching errors before the problem got…[more]
Can you provide any more details (i.e., step-by-step instructions) on generating a RSS feed from Windows Event Logs using the Rss.aspx and Rss.aspx.cs files? Can this work from a Windows desktop (i.e., running 2000 or XP)?
If you can point me in the right direction, and I can get it to work, I’ll write up the details and make them available on my website or yours, or anywhere else it can help others trying the same thing.
I’ve also posted a message on my blog about converting your code to Python. Would you allow that? I think it would be useful, interesting and it could be made open source.
Greg Reinacker’s ‘EventLog -> RSS’ Could publish the RSS and point your support team’s news aggregator at the various RSS feeds, one per appserver… isntant popup on errors etc? could be handy?…[more]
…[more]
Pingback
Hi,
I’m gettin this error.
Please, should be possible for you make any suggestion on how to fix it?
Thanks in advance.
Ricardo
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0260: Missing partial modifier on declaration of type ‘EventLogRss.Rss’; another partial declaration of this type exists
Source Error:
Line 18: /// Summary description for Rss.
Line 19: ///
Line 20: public class Rss : System.Web.UI.Page
Line 21: {
Line 22: private int NUM_ENTRIES = 100;
Source File: e:\Documents and Settings\Ricardo\My Documents\Visual Studio 2005\WebSites\WebSite1\Rss.aspx.cs Line: 20