Thursday, October 08, 2009

Drools Monitoring with JMX

Drools is designed to support multiple business scenarios. Some of them, known as Decision Services, usually use short lived, stateless session. Others, use stateful sessions, and specially in the case of CEP scenarios, it is very common to have long living sessions that frequently span the whole life of the application.

In such scenarios, the ability to monitor and inspect the contents of the knowledge bases and their associated sessions becomes more and more important.

Drools 5.1 brings support to the JMX standard and enables knowledge base and knowledge session monitoring and inspection using any JMX console. Bellow you can see some screenshots of VisualVM JMX console connected to the Drools Fusion example application.

Knowledge Base stats

Knowledge Base Configuration

Knowledge Session stats

Some of the stats are presented in consolidated graph/values, but individual rule stats are also available through JMX operations. That level of detail even allows users to know which rules are taking longer to fire or which ones are being canceled the most.

Happy Drooling.