Introductions
To expose JMX metrics from a Kafka instance to OpenTelemetry, you’ll need to configure the OpenTelemetry JMX Receiver to scrape the JMX metrics exposed by Kafka. Here’s an example of how you can configure the JMX receiver and Kafka workload to expose the metrics:
Kubernetes 2.0 ConfigMap
apiVersion: v1
kind: ConfigMap
metadata:
name: opsramp-workload-metric-user-config
namespace: opsramp-agent
data:
workloads: |
kafka/jmx:
- name: kafka1
collectionInterval: 10s
port: 11442
targetPodSelector:
matchLabels:
- key: app
operator: ==
value:
- kafka
Note
In the workload, we have specified that the workload type iskafka/jmx
. This configuration is specific to Kafka applications. For other workloads, the format should be workloadname/jmx
, where “workloadname” corresponds to the relevant application.