Deploy a Prometheus + Grafana stack using docker-compose.
This is an interactive tutorial to understand how all the components work. Do not use in production!
Clone the project.
make stackup
You now have a full stack running.
Prometheus
is serving on port 9090
node-exporter
is serving on port 9100
Note: Prometheus is set to scrape every second for faster feedback. If you notice performance degradation, you can change it to an higher value.
Included is a few Prometheus tips that help you on the learning journey. To get a list of tips, execute:
make tips
These are a list of queries that may prove useful.
Any time you want to go back to the default configuration, just run:
make render-prometheus-config
It is assumed that after you modify the Prometheus configuration you reload it to see the effects:
Reload after every change:
make reload-prometheus
To get a list of expensive metrics, use this tip on your Prometheus PromQL:
make tip-expensive-metrics
Then to drop the expensive metric onto the prometheus config:
make drop-expensive-metric metric=<metric name>
Eliminate all go stack traces:
make drop-go-stacktrace