Closed chrisluedtke closed 3 months ago
@chrisluedtke can you upgrade to version 1.0.1
and re-test?
There were issues before version 1.0.1
that could cause the inconsistency. Specifically, if two MBean names are normalized to the same metric name, the value being returned would typically be the last MBean value encountered.
Thanks @dhoard. 1.0.1 has the same problem for me. I found that this issue is not present when running a standalone single process of kafka connect. So this appears to be a distributed system issue.
@chrisluedtke How are you managing ingress for the Connect containers when running a cluster?
I'm running a kubernetes kafka-connect service with a selector that matches a label on the deployment and worker pods. I only access it from within the cluster (or use kubefwd
to connect), e.g. via http://kafka-connect.dev-kafka-connect.svc.cluster.local:8080/metrics. So I'm relying on kube-proxy to route the request to the pod. Do I need to access each pod to gather all metrics, or is there a way to get all metrics in a single call to the leader?
apiVersion: v1
kind: Service
metadata:
creationTimestamp: "2024-08-02T20:19:45Z"
name: kafka-connect
namespace: dev-kafka-connect
resourceVersion: "993603120"
uid:<redacted_uid>
spec:
clusterIP: <redacted_ip_1>
clusterIPs:
- <redacted_ip_1>
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: connect
port: 8083
protocol: TCP
targetPort: 8083
- name: jmx
port: 1976
protocol: TCP
targetPort: 1976
- name: prometheus
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: kafka-connect
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
I appreciate your input! I realize this is most likely a "me" problem.
@chrisluedtke each Connect pod will need to be scraped directly. I suspect your ingress is bouncing between Connect PODS (exporters), resulting in different metrics
Gotcha, I'll implement a prometheus server and pull metrics from there instead.
When I hit my metrics endpoint via
curl debezium:8080
, I get different connector metrics each time. I've seen this behavior in both core kafka connect metrics (task status), and in snapshot metrics from a debezium connector.In this example, I expect to see 3 connector statuses each time:
Kafka connect dockerfile:
JMX config: