Django
4,567

Created 12/20/2022
Updated 12/22/2022
Revision 2
Categories
Web Servers
Grafana Version >=9.3.1
Datasources
Prometheus

Django metrics dashboard showing request latency, top long executing views, database and cache status. Uses django-prometheus metrics exporter.

Application label is injected in Prometheus configuration to distinguish virtual hosts:

- job name: django
  static_configs:
    - targets: ['localhost:9110']
      labels:
        app: 'somesite'
Get Dashboard
Download
Copy to Clipboard
Source Grafana.com

Used Metrics 15

  • django_http_requests_total_by_transport_total

  • django_http_responses_total_by_status_total

  • django_db_errors_total

  • django_db_new_connection_errors_total

  • django_cache_get_hits_total

  • django_cache_get_total

  • django_http_requests_latency_including_middlewares_seconds_bucket

  • django_http_responses_body_total_bytes_bucket

  • django_http_requests_latency_seconds_by_view_method_bucket

  • topk

  • django_http_requests_latency_seconds_by_view_method_count

  • present_over_time

  • django_http_requests_total_by_view_transport_method_total

  • django_db_execute_total

  • django_db_query_duration_seconds_bucket