Reputation: 3167
I installed mongodb using helm and then later installed prometheus using heml. When I checked grafana, it had already discovered the mongodb pods and shows the disk space and cpu usage etc., I'm guessing it discovered using the builtin service monitor for prometheus for kube services and nodes since i don't see a addition mongodb service monitor installed by default.
These are the built in service monitors that got installed with prometheus:
prometheus-prometheus-oper-alertmanager 107m
prometheus-prometheus-oper-apiserver 107m
prometheus-prometheus-oper-coredns 107m
prometheus-prometheus-oper-grafana 107m
prometheus-prometheus-oper-kube-controller-manager 107m
prometheus-prometheus-oper-kube-etcd 107m
prometheus-prometheus-oper-kube-proxy 107m
prometheus-prometheus-oper-kube-scheduler 107m
prometheus-prometheus-oper-kube-state-metrics 107m
prometheus-prometheus-oper-kubelet 107m
prometheus-prometheus-oper-node-exporter 107m
prometheus-prometheus-oper-operator 107m
prometheus-prometheus-oper-prometheus 107m
In the docs they have a exporter for mongodb called mongodb-exporter-prometheus-mongodb-exporter
. I installed it I don't see any difference. I still see the same pods that were detected already.
What is the need for the mongodb-exporter-prometheus-mongodb-exporter
? I thought maybe it'll show some DB insights.
I'm about to test mysql pods and I guess there is really no need for the mysql exporter either if promethues can detect them without it.
Upvotes: 0
Views: 547
Reputation: 44657
An exporter is needed if the original application(mysql, mongodb etc) are not able to expose metrics in prometheus format at /metrics
endpoint or you need more metrics which is not exposed by the original application. Hence the exporter's responsibility is to expose metrics without needing the original application to be instrumented for exposing metrics.
You need to configure prometheus to be able to discover the exporter application pod using a service monitor. You get more metrics via the exporter which is not available in the original mongodb application.
Upvotes: 2