Drools Correlation Engine

From OpenNMS
Jump to: navigation, search

Drools is a business logic engine that allows you to correlate events, see http://www.jboss.org/drools.

The correlation engine lets you do complex workflows and event processing (including detection of flapping). We have a couple of examples of what can be done in the $OPENNMS_HOME/etc/examples/drools-engine.d directory. If you’d like to try them out, just recursively copy the nodeParentRules subdirectory of that directory into the existing $OPENNMS_HOME/etc/drools-engine.d directory. The contents are:

drools-engine.xml Configures the Drools correlation engine. This file contains the Drools-specific configuration for event correlation. In it you define <rule-set> tags which refer to the code, events, and other variables that are relevant.

LocationMonitorRules.drl An example Drools correlation rule which can detect flapping outages from remote pollers.

locationMonitorRules-context.xml A spring configuration file to provide extra resources to the “location monitor” Drools rule.

NodeParentRules.drl An example Drools correlation rule which can do root cause analysis on node outages based on a node parent outage.

nodeParentRules-context.xml A spring configuration file to provide extra resources to the “node parent” Drools rule.


Then, edit your $OPENNMS_HOME/etc/service-configuration.xml and uncomment the service named “OpenNMS:Name=Correlator” and restart OpenNMS.

Other than that, using Drools is not very well documented yet, but if you are a Java developer, you should be able to work out what’s going on looking at the rules and configuration files.