Metrics Monitoring

Monitor Everything Before Failures Happen

MongoDB Monitoring

Resources from Video Description

Key Takeaways

  • MongoDB Exporter – Scrapes MongoDB stats and exposes them at its own /metrics endpoint for Prometheus to pull.
  • Discovery via ServiceMonitor – A ServiceMonitor tells Prometheus where the exporter lives; kube-prometheus-stack installs typically require the release: prometheus label for discovery.
  • Cluster DNS & Ports – Exporters reach MongoDB through the Service DNS/port (e.g., mongodb.mongodb.svc.cluster.local:27017) regardless of namespaces.
  • Auth via Secrets/URI – Connection is provided as a MongoDB URI; best practice is to source it from a Kubernetes Secret (e.g., existingSecret with a connectionURI key) rather than hardcoding credentials.
  • End-to-End Flow & Health Signal – Exporter → Prometheus TSDB → Grafana dashboards; the mongodb_up metric (1 = up) confirms connectivity and scraping.