Prometheus JMX exporter and ActiveMQ

465 Views Asked by At

I am running AMQ with the jmx_exporter and using the provided config yaml file.

lowercaseOutputName: true
lowercaseOutputLabelNames: true
blacklistObjectNames:
  - "org.apache.activemq:clientId=*,*"
whitelistObjectNames:
  - "org.apache.activemq:destinationType=Topic,*"

rules:

  - pattern: org.apache.activemq<type=Broker, brokerName=(\S*), destinationType=Topic, destinationName=(\S*)><>(\w+)
    name: activemq_topic_$3
    attrNameSnakeCase: true
    labels:
      destination: $2

The output I get is something along with this:

activemq_topic_enqueue_count{destination="topic_1_name",} 0.0

My question:

Now, all attributes are being exposed to the endpoint while Im only interested in two, namely enqueue_count and dequeue_count. How do I achieve this?

1

There are 1 best solutions below

1
Matt Pavlovich On

Check out the examples from the prometheus jmx_exporter. They show you how to configure fields and for what prometheus type-- COUNTER, GAUGE, etc.

For enqueue count & dequeue count you'll want COUNTER

ref: https://github.com/prometheus/jmx_exporter/tree/main/example_configs