/prometheus-monitoring-tutorial

Interactive tutorial to learn the Prometheus stack (WIP)

Primary LanguageMakefileGNU Affero General Public License v3.0AGPL-3.0

Description

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!

Requirements

Installation

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.

Tips

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.

See It In Action

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

Example 1 - Drop expensive metrics

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>

Example 1.1 - Drop all go stack traces

Eliminate all go stack traces:

make drop-go-stacktrace