How to access database statistics in a custom load metric class in JBoss EAP 6?

Solution Unverified - Updated -

Issue

  • There is a custom mod_cluster Load Metric as mentioned here and I want to access things like the JDBC connection pool statistics, etc. In the CLI I can do it like this:
/subsystem=datasources/data-source=NAME/statistics=pool/:read-attribute(name=InUseCount)

for example, but how do I access these information in my Metric Java class?

  • We get "InstanceNotFoundException" because the metrics are executed before all subsystems are loaded. How to implement this?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content