<?xml version='1.0' encoding='iso-8859-1'?><%response.Charset="iso-8859-1"%><%Response.contentType = "application/rss+xml"%><rss version="0.92"> <channel><title>Alerts in NPM</title> <link>www.solarwinds.net</link> <description>Lists alerts from NPM / Orion</description> <copyright>Copyright (C) NMG.SE All rights reserved.</copyright> <generator>NMG RSS Generator</generator><managingEditor>Kaj@nmg.se</managingEditor><%dim conndim DSNtempdim rsdim sqlstmtdim custFunction ConvertCodes(str) Dim i, letter, temp For i = 1 to Len(str) letter = Mid(str,i,1) If Asc(letter) > 122 Then temp = temp & "#" & Asc(letter) & ";" Else temp = temp & letter End If Next ConvertCodes = tempEnd Functionset conn = server.createobject("adodb.connection")DSNtemp = "DSN=YourODBCConnectiontoNPMDB;"conn.Open DSNtemp sqlstmt = "select nodename, alerttime, eventmessage from activealerts where propertyid <> '11' order by alerttime desc"Set rs = Server.CreateObject("ADODB.Recordset")rs.Open sqlstmt, DSNtempx = 0For x = 1 to 50 If rs.eof then Exit For Else title= Replace(rs("nodename"),"&","&") title = ConvertCodes(title) description = Replace(rs("eventmessage"),"&","&") description = ConvertCodes(description) Response.Write "<item>" Response.Write "<title>" & title & "</title>" Response.Write "<link>">www.solarwinds.net</link>" Response.Write "<description>" & description & "</description>" Response.Write "<pubDate>" & rs("alerttime") & "</pubDate>" Response.Write "</item>" rs.MoveNext End IfNext%></channel></rss>
quote:Originally posted by Kaj LehtinenHi!Since no one responded I wrote a quick RSS feed that pulls all active alerts from NPM DB. To implement simply copy into a ASP file on your NPM server and setup a System DSN to your SQL server and change the text 'YourODBCConnectiontoNPMDB' to the right DSN.In my RSS reader in treo 600 it displays all the alerts present, but officially the RSS 0.92 should have a limit of 15 'news', so it might be working differently in your rss reader. Also it doesnt display reboots at the moment, if you want that remove the text "where propertyid <> '11'" in the row starting with sqlstmt. <?xml version='1.0' encoding='iso-8859-1'?><%response.Charset="iso-8859-1"%><%Response.contentType = "application/rss+xml"%><rss version="0.92"> <channel><title>Alerts in NPM</title> <link>www.solarwinds.net</link> <description>Lists alerts from NPM / Orion</description> <copyright>Copyright (C) NMG.SE All rights reserved.</copyright> <generator>NMG RSS Generator</generator><managingEditor>Kaj@nmg.se</managingEditor><%dim conndim DSNtempdim rsdim sqlstmtdim custFunction ConvertCodes(str) Dim i, letter, temp For i = 1 to Len(str) letter = Mid(str,i,1) If Asc(letter) > 122 Then temp = temp & "#" & Asc(letter) & ";" Else temp = temp & letter End If Next ConvertCodes = tempEnd Functionset conn = server.createobject("adodb.connection")DSNtemp = "DSN=YourODBCConnectiontoNPMDB;"conn.Open DSNtemp sqlstmt = "select nodename, alerttime, eventmessage from activealerts where propertyid <> '11' order by alerttime desc"Set rs = Server.CreateObject("ADODB.Recordset")rs.Open sqlstmt, DSNtempx = 0For x = 1 to 50 If rs.eof then Exit For Else title= Replace(rs("nodename"),"&","&") title = ConvertCodes(title) description = Replace(rs("eventmessage"),"&","&") description = ConvertCodes(description) Response.Write "<item>" Response.Write "<title>" & title & "</title>" Response.Write "<link>">www.solarwinds.net</link>" Response.Write "<description>" & description & "</description>" Response.Write "<pubDate>" & rs("alerttime") & "</pubDate>" Response.Write "</item>" rs.MoveNext End IfNext%></channel></rss>