These is my app manifest:
apiVersion: apps/v1
kind: Deployment
metadata:
name: mongodb-deployment
labels:
app: mongodb
spec:
replicas: 1
selector:
matchLabels:
app: mongodb
template:
metadata:
labels:
app: mongodb
spec:
containers:
- name: mongodb
image: mongo:latest
ports:
- containerPort: 27017
---
apiVersion: v1
kind: Service
metadata:
name: mongodb-service
spec:
selector:
app: mongodb
ports:
- protocol: TCP
port: 27017
targetPort: 27017
My app’s exporter’s updated values (mongodb-exporter.yaml
):
uri: "mongodb://mongodb-service:27017"
serviceMonitor:
enabled: true
additionalLabels:
release: prometheus
I apply the helm chart using:
helm install mongodb-exporter prometheus-community/prometheus-mongodb-exporter -f mongodb-exporter.yaml
I can now see the service monitor for mongo db in the Prometheus UI but when I try to visualize metrics on Grafana, I get No data
-
What Grafana version and what operating system are you using?
Latest Grafana version, I think. I got this version pre-bundled when I applied the kube-prometheus helm stack -
What did you expect to happen?
Expecting metrics to show up -
Did you follow any online instructions? If so, what is the URL?
I was following this tutorial: Prometheus Monitoring - Steps to monitor third-party apps using Prometheus Exporter | Part 2 - YouTube