korfuri / django-prometheus

Export Django monitoring metrics for Prometheus.io
Apache License 2.0
1.44k stars 244 forks source link

django-prometheus How to collect data on multiple machines and multiple processes? #431

Open ponponon opened 1 month ago

ponponon commented 1 month ago

If my service is deployed in k8s, there will be multiple pod instances scattered across different nodes, how do I summarize them?

andrew-cybsafe commented 1 month ago

There are various guides online on how to do this, but essentially you'll need to:

  1. create a prometheus service in your cluster
  2. configure your services to export metrics, usually via a HTTP GET to /metrics
  3. configure the prometheus service to scrape the metrics

Guides: https://www.squadcast.com/blog/install-prometheus-kubernetes https://devopscube.com/setup-prometheus-monitoring-on-kubernetes/