[rules-users] Usage Question

Glenn Macgregor gmacgregor at pocketkings.ie
Tue Feb 9 06:17:11 EST 2010


Hi All,

I am in the process of evaluating Drools to use in a networks & systems management project. Some of the initial use cases are listed below.

Use Cases:

1.       Simple single parameter thresholds with configurable warning and error levels.

2.       Simple multi parameter thresholds from one host with configurable warning and error levels.

3.       Complex multi parameter thresholds from multiple hosts with configurable warning and error levels.

4.       Complex time based multi parameter thresholds from multiple hosts with configurable warning and error levels.

After reading about the Drools rules engine (Expert) and the CEP (Fusion) it seems at a glance that it would be very useful in this application. As I digging into use case 1 I am not sure Drools is actually going to fit the bill as first thought.

Imagine a small network with 300 hosts each of which is being polled for CPU data which can be massaged to produce an instantaneous CPU Utilization which I want to check against some threshold, which can be different for each host. I don't see creating 300 rules to handle this simple case as an ideal solution as I need to give control of the CPU Utilization threshold to the teams who own the hosts. Thinking about how to abstract that I imagine I could put the thresholds into a database and rebuild/reload the rules as necessary but as the thresholds could change often this seems like unnecessary overhead. I have moved on from that solution to the idea that a threshold is an attribute of the parameter as name and value are attributes. This allows me to attach the threshold value to the parameter update and potentially have a Drools rule something like (not a working rule):

rule "test rule"
                when
                                $param : Parameter(name == someName) # comes from some map of params or something, not sure yet.
                                $param(value >= warningThreshold)
                then
                                # Fire warning alert
                end

Where value and warningThreshold are members of the Parameter object.

Having thought about this and discussed with some colleagues we can not impose a '>=' in the rule as some teams might what a different set of comparators. Moving on to these new requirements I thought we could have all the info encapsulated into the Parameter object as a set of functions:

*         isInWarning

*         isInError

rule "test rule"
                when
                                $param : Parameter(name == someName) # comes from some map of params or something, not sure yet.
                                $param.isInWarning()
                then
                                # Fire warning event
                End

Questions:

*         Is the above possible in Drools?

*         What does Drools get me as my software is already doing all the calculation and comparison work?

*         Is there a better way to handle this using Drools?

Thanks for the reply's

 Glenn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100209/027d9ab3/attachment.html 


More information about the rules-users mailing list