python-monitoring-talk
python-monitoring-talk copied to clipboard
Materials for my talks and articles on monitoring with focus on Python applications
Table of contents
This repo contains the materials that I have prepared and referred to while exploring monitoring in Python.
-
Materials for my talks/articles on Python monitoring
- Videos
- Slides
- Articles
- Tips and Tricks
-
Playing with the demos
- VM Setup on Windows 10 with Hyper-V
- VM Setup on Windows/Linux/OS X - VirtualBox
-
Learn more
- General
- Statsd/Graphite
- Prometheus
- Readings: Doing things right
Materials for my talks/articles on Python monitoring
Videos
Slides
- Sydney Django Meetup - August 2019
- PyCon 2018
- Sydney Python Meetup - March, 2018
Articles
- Understanding metrics and monitoring with Python
- Exploring Security, Metrics, and Error-handling with gRPC in Python
- Your options for monitoring multi-process Python applications with Prometheus
- Monitoring Your Synchronous Python Web Applications Using Prometheus
- Monitoring Your Asynchronous Python Web Applications Using Prometheus
Tips and Tricks
- Miscellaneous notes
Playing with the demos
I recommend using a VM to play with the demos. This repo ships with a Vagrantfile for installing Ubuntu 16.04. Please install Vagrant for your operating system and then:
VM Setup on Windows 10 with Hyper-V
You will need to open a powershell session as Adminstrator and do the following from a clone of the git repository:
C:\> ~\work\github.com\amitsaha\python-monitoring-talk [master ≡]> vagrant up --provider=hyperv
Bringing machine 'default' up with 'hyperv' provider...
==> default: Verifying Hyper-V is enabled...
==> default: Importing a Hyper-V instance
default: Please choose a switch to attach to your Hyper-V instance.
default: If none of these are appropriate, please open the Hyper-V manager
default: to create a new virtual switch.
default:
default: 1) Default Switch
default: 2) nat
default: 3) minikube-virtualswitch
default:
default: What switch would you like to use? 1
default: Cloning virtual hard drive...
default: Creating and registering the VM...
default: Setting VM Integration Services
default: Successfully imported a VM with name: ubuntu-18.04-amd64_1
==> default: Starting the machine...
==> default: Waiting for the machine to report its IP address...
default: Timeout: 120 seconds
Then, we will ssh
into the VM using:
C:\> ~\work\github.com\amitsaha\python-monitoring-talk [master ≡]> vagrant ssh
VM Setup on Windows/Linux/OS X - VirtualBox
$ vagrant up
...
$ vagrant ssh
Now, that we are in the VM, the /vagrant
directory has a copy of the entire repository from where you
can play with the demos:
$ cd /vagrant
$ ls
demo1 LICENSE prometheus scripts statsd Vagrantfile
demo2 opensource-com-article README.md slides statsd_prometheus
Demos:
- demo1
- demo2
- statsd
- promtheus
- statsd_prometheus
Each demo directory above has a README explaining the instructions of playing with the demo. In general, to access a network port running in the virtual machine, use the following address in your browser:
$ 127.0.0.1:port
If it doesn't work, please file an issue with OS + VM details.
Learn more
The following resources are some of the ones that I found very useful:
General
- Monitoring Distributed Systems
- Monitoring best practices
- Who wants seconds?
- Monitoring: Not just for outages
- Avoid the wall of graphs
- Latency primer
Statsd/Graphite
Prometheus
- Prometheus metric types
- How does a prometheus gauge work?
- Why are prometheus histograms cumulative?
- Monitoring batch jobs in Python
- Promtheus monitoring at soundcloud
- Why are Prometheus histograms cumulative?
- Capturing spikes
- Prometheus for developers