Skip to content

guillaumelamirand/docker-monitor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Monitor

Project Maintenance

GitHub Release GitHub Activity License

hacs Community Forum

Integration to monitor docker containers.

About

This repository contains custom components I developed for my own Home-Assistant setup. Feel free to use the components and report bugs if you find them. If you want to contribute, please report a bug or pull request and I will reply as soon as possible.

This component is based on the work done by Sanderhuisman.

How it works

The Docker monitor allows you to monitor statistics containers. The monitor can connected to a daemon through the url parameter. When home assistant is used within a Docker container, the daemon can be mounted as follows -v /var/run/docker.sock:/var/run/docker.sock:ro. The monitor is based on Glances and ha-dockermon.

Important note: as the loading path of platforms have been changed in issue #20807, the current version requires HA versions 0.88 and above. For older versions, use version 0.0.1.

Installation with HACS

HACS is a custom integration that allows you to search for, discover, install, and manage custom additions to Home Assistant.

  1. In the HACS store select the Settings tab.
  2. Enter guillaumelamirand/docker-monitor in the Add Custom Repository box and select Integration from the Category list.
  3. On the Integrations tab search for "Docker Monitor" and follow the links to install.

Configuration

To use the docker_monitor in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
docker_monitor:
  containers:
    - homeassistant_homeassistant_1
    - homeassistant_mariadb_1
    - homeassistant_mosquitto_1
  monitored_conditions:
    - docker_version
    - container_status
    - container_memory_usage
    - container_memory_percentage_usage
    - container_cpu_percentage_usage

Variables

Parameter Type Description
name string (Optional) Client name of Docker daemon. Defaults to Docker.
url string (Optional) Host URL of Docker daemon. Defaults to unix://var/run/docker.sock.
scan_interval time_period (Optional) Update interval. Defaults to 10 seconds.
containers list (Optional) Array of containers to monitor. Defaults to all containers.
monitored_conditions list (Optional) Array of conditions to be monitored. Defaults to all conditions
Monitored conditions Description Unit
docker_version Docker version -
container_status Container status -
container_uptime Container up time minutes
container_cpu_percentage_usage CPU usage %
container_memory_usage Memory usage MiB
container_memory_percentage_usage Memory usage %
container_network_speed_up Network total speed upstream kB/s
container_network_speed_down Network total speed downstream kB/s
container_network_total_up Network total upstream MB
container_network_total_down Network total downstream MB

Credits


About

🏡 Custom components for Home-Assistant

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%