Closed naude-r closed 4 years ago
I believe Prometheus scraper does not need it and scrapes directly from the pods in order to distinguish one pod from another. That is what I got by just turning exporter on: https://imgur.com/a/1jHQIVZ I have three of these endpoints one for each keydb pod.
thank you for the quick response.
for some reason that did not work. had to create a ServiceMonitor to enable scraping. using the prometheus operator and installed using: cluster-monitoring. the monitor did not work without modifying the service. not a big deal though.
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: keydb
namespace: monitoring
labels:
app: keydb
release: prometheus
spec:
selector:
matchLabels:
app.kubernetes.io/name: keydb
namespaceSelector:
matchNames:
- my-ns
endpoints:
- port: redis-exporter
interval: 15s
jobLabel: redis-exporter
My Prometheus set up goes with an official helm chart: https://hub.helm.sh/charts/stable/prometheus installed without any deep customizations for K8s scraping.
thank you, will close the issue.
the service created, keydb, does not expose the redis-exporter port.
could you please add the redis-exporter port to the service created by default. this will ease setting up the prometheus service monitor.