Skip to content

Basic demo application showcasing Django + Prometheus + Kubernetes

Notifications You must be signed in to change notification settings

xiechuanjun/django-prometheus-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-prometheus-demo

Basic demo application showcasing Django + Prometheus + Kubernetes. For more reading about the why and how of custom metrics with Django, you can check out the post custom application metrics with Django, Prometheus, and Kubernetes.

Running

Dependencies

You'll need Docker installed and a Kubernetes cluster to deploy Prometheus to (Minikube should work just fine). You'll also need to install the Tiller server into the cluster and have the client available locally.

Install the Web App

# in real life, we wouldnt VC the .htpasswd, but this is easy
kc create secret generic prometheus-basic-auth --from-file=.htpasswd=prometheus/.htpasswd
make

Install the prometheus helm chart

helm upgrade --install prometheus stable/prometheus -f helm/prometheus/values.yaml

Testing

The primary urls for interacting with the app are:

  • /walks/start/
  • /walks/<walk_id>/complete/
  • /walks/<walk_id>/status/

You can perform some actions at these locations, then verify that metrics are set properly by either:

Development

docker-compose up -d

About

Basic demo application showcasing Django + Prometheus + Kubernetes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Smarty 59.4%
  • Dockerfile 31.9%
  • Makefile 8.7%