Here you can find a few simple usage examples.
Prepare environment:
- Make sure you have Python 3.6+ installed
- Install pyp8s
python3 -m pip install pyp8s - Run an example
python3 examples/pyp8s_ticker.py
An example of how simple it can be. It wouldn't be up to Prometheus standards, but it's going to work.
A tiny application that counts seconds from the startup.
In this example we only start the metrics server. Nothing else changes.
A few workarounds on how to make python accept things that are legal for Prometheus metrics, but cause syntax error in Python.