Easily Monitor Docker Containers

Easily Monitor Docker Containers

Have one or more docker containers you want to monitor but don't know how to get started? Here are some solutions!

I was thinking about the same question a few weeks ago, and finally found two great solutions for monitoring my containers. While not complete, as performance monitoring is still missing, I can know for sure when the services running in the container are working, or if they are not working, I can easily see what might have happened.

Note that I have intentionally limited the containers in terms of resources, because if you don't do this (for each container!), you risk that if something goes wrong inside that container, it will take the resources of the whole machine and it may become unusable.

Let's look at what these two solutions are:

Uptime Kuma

With this software, it is very easy to configure the monitoring of containers and the software running on them. It will alert you if it is not available on almost any platform (I use Discord for example).

I don't want to write too much about it, but the developer has put together a great description of it by clicking here (GitHub).

My own dashboard currently looks like this (I've cleaned out the sensitive data):

And the docker compose looks like this:

services:
  uptime-kuma:
    image: louislam/uptime-kuma:alpine
    container_name: uptime-kuma
    volumes:
      - /mnt/Docker/uptime-kuma:/app/data
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 3001:3001
    restart: always
    network_mode: bridge
    cpus: 0.5
    mem_limit: 400M

 

Dozzle

Dozzle is a small lightweight application with a web based interface to monitor Docker logs. It's really useful for debugging a container.

I don't want to write too much about it, but the developer has put together a great description of it by clicking here (GitHub).

My own dashboard currently looks like this (I've cleaned out the sensitive data):

And the docker compose looks like this:

services:
  dozzle:
    container_name: dozzle
    image: amir20/dozzle:latest
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 8888:8080
    restart: always
    network_mode: bridge
    cpus: 0.3
    mem_limit: 200M

 

 

I'm still looking for an easy way to monitor the resource usage of containers, but so far I've only found complicated solutions. If you know of a simple way to do this, please leave it in a comment below! Thanks! :)

Comments