Support Patterns for JMXMonitor Beans

Description

The JMXMonitor only supports literal ObjectNames, which makes it difficult to handle some mbeans. Many mbeans, including those for Quartz Scheduler and ActiveMQ, include instance-specific keys in their names, for example:

  • org.apache.activemq:type=Broker,service=Health,brokerName=foo.example.com

  • quartz:type=QuartzScheduler,name=MY_SCHEDULER,instance=foo.example.com12345678

The code in ObjectNameWrapper, however, throws an IllegalArgumentException if any pattern is used, even if that pattern would only match a single bean.

Instead, I'd suggest that the code should allow patterns, and should instead throw some sort of exception if the pattern matches more than one bean.

See also:

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

PagerDuty

Created December 29, 2017 at 4:30 PM
Updated September 21, 2021 at 9:14 PM