strimzi-kafka-operator: [Bug]: strimzi operator doesn't expose content-type in /metrics endpoint
Bug Description
after upgrading to Prometheus v3, we noticed it started to alert us on TargetDown for strimzi operator pods
the error from the logs are non-compliant scrape target sending blank Content-Type and no fallback_scrape_protocol specified for target
Steps to reproduce
- deploy strimzi operator
- deploy prometheus v3
- create pod/service monitor and try to scrape the /metrics endpoint
Expected behavior
prometheus v3 should scrape without any issues
Strimzi version
0.44.0
Kubernetes version
1.30.5
Installation method
helm chart
Infrastructure
GKE
Configuration files and logs
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: cluster-operator-metrics
labels:
app: strimzi
spec:
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
podMetricsEndpoints:
- path: /metrics
port: http
selector:
matchLabels:
name: strimzi-cluster-operator
podmonitor config we used
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (15 by maintainers)
Commits related to this issue
- Add content type to the operator metric endpoints - Closes #10902 Signed-off-by: Jakub Scholz <www@scholzj.com> — committed to scholzj/strimzi-kafka-operator by scholzj 2 years ago
Ok, I opened a PR for it. But I do not have any Prometheus 3 installation. So I cannot really test it with that. I only verified that my old Prometheus still works and that the Content-Type is there when trying with
curl.