Skip to content

Docker Monitoring with Prometheus

Mattias Martikainen edited this page Jun 16, 2017 · 1 revision

Found a really nice monitoringsolution of your dockerenvironment created by Stefan Prodan

A monitoring solution for Docker hosts, containers and containerized services

It's an easy installed, preconfigured solution, just two minutes of work to get it working and you will get nice statistics from your dockerhost.

Adding it to your docker environment

Install docker-compose

sudo apt-get docker-compose

Clone dockprom repository on your Docker host, cd into dockprom directory and run compose up:

  • cd /Docker
  • git clone https://github.com/stefanprodan/dockprom
  • cd dockprom
  • docker-compose up -d

Containers:

  • Prometheus (metrics database) http://:9090
  • AlertManager (alerts management) http://:9093
  • Grafana (visualize metrics) http://:3000
  • NodeExporter (host metrics collector)
  • cAdvisor (containers metrics collector)

Setup Grafana

Navigate to http://<host-ip>:3000 and login with user admin password changeme. You can change the password from Grafana UI or by modifying the user.config file.

From the Grafana menu, choose Data Sources and click on Add Data Source. Use the following values to add the Prometheus container as data source:

  • Name: Prometheus
  • Type: Prometheus
  • Url: http://prometheus:9090
  • Access: proxy Now you can import the dashboard temples from the grafana directory. From the Grafana menu, choose Dashboards and click on Import.
Clone this wiki locally