Skip to content

Add basic support for arrays #377

@zeeke

Description

@zeeke

I'm trying to configure an exporter for ActiveMQ and I thinks some array attributes can be useful as exported metric:

The attributes I'm interested on are:

  • org.apache.activemq:type=Broker,brokerName=XXX.Topics
  • org.apache.activemq:type=Broker,brokerName=XXX.Queues
  • org.apache.activemq:type=Broker,brokerName=XXX,destinationType=Queue,destinationName=YYY.Subscriptions

and the object type is (as reported by VisualVM): javax.management.ObjectName[205]

These object aren't supported by the exporter, as stated in:
https://github.com/prometheus/jmx_exporter/blob/master/collector/src/main/java/io/prometheus/jmx/JmxScraper.java#L273

Please think if a simple array length can be extracted as a metric for this kind of objects. If there aren't any better plan to manage arrays, it's better than nothing.

I can work on a PR if needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions