Docker Monitoring Stack with Grafana

Ruan Bekker
3 min readApr 28, 2022

In this tutorial we will dive a bit deeper into the docker-monitoring-stack-gpnc repository, on how to setup a docker monitoring stack that runs grafana, prometheus, node-exporter, cadvisor and alertmanager, which includes node and container level metric dashboards.


The repo has been built to get a monitoring stack up and running within seconds and the components includes:

  • Grafana: For visualising graphs
  • Prometheus: Timeseries Database for Metrics
  • cAdvisor: Exposes Container Metrics
  • Node-Exporter: Exposes Node Metrics
  • Alertmanager: Manages Alerts


First clone the repository:

git clone

Then change into the directory:

cd docker-monitoring-stack-gpnc

You can inspect the docker-compose.yml file to view all the container’s and it’s configuration.

You will notice there’s a Makefile so to view the targets run make:

help                           This help.
up Runs the containers in detached mode
clean Stops and removes all containers
logs View the logs from the containers
open Opens tabs in container


To boot the stack, we can use make up, but for this tutorial we will use the docker commands:

docker-compose up -d

Ensure all containers are running:

docker-compose ps

The output should look like this:

Name                   Command                  State               Ports         
cadvisor /usr/bin/cadvisor -logtostderr Up (healthy) 8080/tcp
grafana / Up>3000/tcp
node-exporter /bin/node_exporter --path. ... Up 9100/tcp
prometheus /bin/prometheus --config.f ... Up>9090/tcp
alertmanager /bin/alertmanager --config ... Up>9093/tcp

Access grafana on Grafana Home (or make open) and you should see the two dashboards that was provisioned:

Once you select the nodes dashboard, it should look something like this:

When you select “Alerting” and “Alert rules” you will find the recording and alerting rules:

We can expand the alerting rules:

And then we can view more detail on a alert rule:

And for our container metrics we can access the Container Metrics dashboard:


The following endpoints are available:

Container, Endpoint


To remove the containers using docker compose (or make clean):

docker-compose down

Github Repository

You can find the github repository below, if you find it useful, please share or send me some love with a star:

Thank You

Thanks for reading, if you like the project, feel free to star, fork or share it, check out my website, read my newsletter or follow me at @ruanbekker on Twitter.