Grafana Prometheus Node-Exporter cAdvisor Loki - Docker Monitoring Stack
Get your monitoring stack up and running with one command using a Docker Compose stack featuring:
- Grafana: Dashboarding.
- Prometheus: Timeseries database for metrics.
- Node-Exporter: Node metrics.
- cAdvisor: Container metrics.
Note: Due to docker-compose and the compose plugin, you might have one of the two installed. I have a Makefile that will detect which on you have installed.
You can list the targets using make.
Boot the stack with docker compose (or make up):
docker-compose up -dEnsure all containers are running:
docker-compose psThe output should looke like this:
Name Command State Ports
-----------------------------------------------------------------------------------------------------
cadvisor /usr/bin/cadvisor -logtostderr Up (healthy) 8080/tcp
grafana /run.sh Up 0.0.0.0:3000->3000/tcp
node-exporter /bin/node_exporter --path. ... Up 9100/tcp
prometheus /bin/prometheus --config.f ... Up 0.0.0.0:9090->9090/tcpAccess grafana on Grafana Home (or make open) and you should see the three dashboards that was provisioned:
Once you select the Node Metrics dashboard, it should look something like this:
And for our container metrics we can access the Container Metrics dashboard:
Then for our last dashboard, the Container Log Search, by default the metric panel will be collapsed, but to expand it for visibility it will look like this:
And we can also view our Container Logs in the explore section:
The following endpoints are available:
| Container | Internal Endpoint | External Endpoint |
|---|---|---|
| Grafana | http://grafana:3000 | http://localhost:3000 |
| Prometheus | http://prometheus:9090 | http://localhost:9090 |
| Node-Exporter | http://node-exporter:9100 | http://localhost:9100 |
| cAdvisor | http://cadvisor:8080 | N/A |
To remove the containers using docker compose (or make clean):
docker-compose down
## Resources
Heavily inspired from [this exporter guide](https://grafana.com/oss/prometheus/exporters/node-exporter/)



