Reputation: 36
Any guidelines for getting OpenTelemetry from Artemis apache/activemq-artemis:2.33.0? I'm using OpenTelemetry for the other components and was somewhat blinded by the "built-in" JMX on port 1099, which doesn't seem to work for me. I now have Jolokia JMX bridge on
- job_name: 'activemq'
static_configs:
- targets: ['activemq-service:8161']
metrics_path: '/console/jolokia/read/org.apache.activemq.artemis:broker=%220.0.0.0%22/TotalMessageCount,Active'
basic_auth:
username: 'admin'
password: 'admin'
Specifically for Prometheus, but of course that returns a json blob while Prometheus wants a key=value as far as I can tell. Could someone point me in the right direction please?
For Prometheus:
In broker.xml
again for Prometheus:
<metrics>
<jvm-memory>true</jvm-memory>
<jvm-gc>true</jvm-gc>
<jvm-threads>true</jvm-threads>
<netty-pool>true</netty-pool>
<file-descriptors>true</file-descriptors>
<processor>true</processor>
<uptime>true</uptime>
<logging>true</logging>
<security-caches>true</security-caches>
<plugin class-name="com.redhat.amq.broker.core.server.metrics.plugins.ArtemisPrometheusMetricsPlugin"/>
</metrics>
I'm missing something in the Prometheus endpoint, as it is returning json (error message is expected equal, got ":" ("INVALID") while parsing: "{\"request\":").
End goal is to have OpenTelemetry exported, not Prometheus, which was just a step to understand what I'm getting.
Upvotes: 0
Views: 330
Reputation: 1
Don't know if this still relevant, but had to implement this on our system.
One of the way to implement this is to enable JMX port on the activemq using com.sun.management.jmxremote.port
JVM property. More on how to enable JMX here.
And then use JMX Metrics gatherer to get those metrics using JMX. Gatherer can directly expose metrics in Prometheus format or export them to collector
Upvotes: 0
Reputation: 35122
As noted in the OpenTelemetry Collector documentation, it can handle Prometheus metrics so using the Prometheus plugin in Artemis should work (assuming you installed it correctly).
If you want to actually push data from ActiveMQ Artemis to OpenTelemetry then you'll need to implement your own plugin which uses the OtlpMeterRegistry
from Micrometer.
Upvotes: 1