Hi all, I have a deployment wherein it would be convenient to continue to monitor the availability of certain nodes but where presenting them on the list of "Nodes with Outages" is not really desirable. I am interested in adding support to my installation for flagging certain nodes to not appear on this list. In my early investigation I think I have discovered a way to do this by modifying opennms-webapp/src/main/java/org/opennms/web/outage/OutageModel.java. I am thinking something like this:
--- opennms-webapp/src/main/java/org/opennms/web/outage/OutageModel.java-orig 2010-06-30 08:03:05.000000000 -0700 +++ opennms-webapp/src/main/java/org/opennms/web/outage/OutageModel.java 2010-06-30 08:04:03.000000000 -0700 @@ -83,7 +83,7 @@ try { Statement stmt = conn.createStatement(); - ResultSet rs = stmt.executeQuery("select o.outageid, o.nodeId, n.nodeLabel, o.ipaddr, ip.iphostname, s.servicename, o.serviceId, o.iflostservice, o.svclosteventid, no.notifyId, no.answeredBy from outages o left outer join notifications no on (o.svclosteventid = no.eventid) join ifservices if on (if.id = o.ifserviceid) join ipinterface ip on (ip.id = if.ipinterfaceid) join node n on (n.nodeid = ip.nodeid) join service s on (s.serviceid = if.serviceid) where ifregainedservice is null and n.nodeType != 'D' and ip.isManaged != 'D' and if.status != 'D' and o.serviceid=s.serviceid and (o.suppresstime is null or o.suppresstime < now()) order by n.nodelabel, ip.ipaddr, s.serviceName"); + ResultSet rs = stmt.executeQuery("select o.outageid, o.nodeId, n.nodeLabel, o.ipaddr, ip.iphostname, s.servicename, o.serviceId, o.iflostservice, o.svclosteventid, no.notifyId, no.answeredBy from outages o left outer join notifications no on (o.svclosteventid = no.eventid) join ifservices if on (if.id = o.ifserviceid) join ipinterface ip on (ip.id = if.ipinterfaceid) join node n on (n.nodeid = ip.nodeid) join service s on (s.serviceid = if.serviceid) where ifregainedservice is null and n.nodeType != 'D' and ip.isManaged != 'D' and if.status != 'D' and o.serviceid=s.serviceid and n.nodeid not in ( select nodeid from assets where assets.displaycategory = 'HideOutages' ) and (o.suppresstime is null or o.suppresstime < now()) order by n.nodelabel, ip.ipaddr, s.serviceName"); outages = rs2Outages(rs, false, true); Which would cause these nodes to not appear in the query results if I set the display category for a given node to match "HideOutages". My questions are: * Is this query used for anything outside of presentation? * Do any of the experts here know of a more elegant way to achieve this? Thanks for your consideration! -Chance ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-devel mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-devel