Replies: 1 comment 10 replies
-
You will have to format the YAMLs to make them readable. But in general, after you apply the YAML from the examples, the metrics will be exposed on every Connect Pod on port 9404 (path |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Team,
I want to know how to configure a kafka connect metrics using a jmx and export it to prometheus ?
I have already gone through a configuration file of kafka-connect-metrics over here - https://github.com/strimzi/strimzi-kafka-operator/blob/main/examples/metrics/kafka-connect-metrics.yaml, but after adding this in the kafka-connect.yaml where can i check the metrics and how to export the port ?
Below is the configuration file of the kafka-connect in my local.
apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaConnect
metadata:
name: strimzi-kafka-connect-cluster
annotations:
strimzi.io/use-connector-resources: "true"
namespace: kafka
spec:
version: 3.6.1
replicas: 1
image: snowflake-jdbc-image
bootstrapServers: my-cluster-kafka-bootstrap:9092
metricsConfig:
type: jmxPrometheusExporter
valueFrom:
configMapKeyRef:
name: connect-metrics
key: metrics-config.yml
config:
group.id: my-cluster
offset.storage.topic: strimzi-connect-cluster-offsets
config.storage.topic: strimzi-connect-cluster-configs
status.storage.topic: strimzi-connect-cluster-status
config.storage.replication.factor: 3
offset.storage.replication.factor: 3
status.storage.replication.factor: 3
config.providers: directory
config.providers.file.class: org.apache.kafka.common.config.provider.DirectoryConfigProvider
kind: ConfigMap
apiVersion: v1
metadata:
name: kafka-metrics
labels:
app: strimzi
data:
metrics-config.yml: |
lowercaseOutputName: true
lowercaseOutputLabelNames: true
rules:
#kafka.connect:type=connector-metrics,connector="{connector}"
- pattern: 'kafka.connect<type=connector-metrics, connector=(.+)><>(connector-class|connector-type|connector-version|status): (.+)'
name: kafka_connect_connector_$2
value: 1
labels:
connector: "$1"
$2: "$3"
help: "Kafka Connect $2 JMX metric type connector"
type: GAUGE
Please help here
Thanks
Raghul P
Beta Was this translation helpful? Give feedback.
All reactions