ualex73 / monitor_docker

Monitor Docker containers from Home Assistant
Apache License 2.0
267 stars 34 forks source link

Can't use health property #54

Closed mario-tux closed 3 years ago

mario-tux commented 3 years ago

I'm trying to enable the health properties for my containers. This is my working-old config:

  - name: Server
    url: tcp://192.168.200.9:2376
    certpath: /ssl/docker-certs/
    containers:
      - XXX
      - YYY
    monitored_conditions:
      - state
      - status
      - image
      - cpu_percentage
      - memory_percentage
      - memory
      - network_speed_up
      - network_speed_down
      - network_total_up
      - network_total_down
      - allinone

trying to add health to the monitored_conditions list I get the following on configuration validation:

Invalid config for [monitor_docker]: value must be one of ['1cpu_percentage', 'allinone', 'containers_1cpu_percentage', 'containers_cpu_percentage', 'containers_memory', 'containers_memory_percentage', 'containers_paused', 'containers_running', 'containers_stopped', 'containers_total', 'cpu_percentage', 'image', 'images', 'memory', 'memory_percentage', 'network_speed_down', 'network_speed_up', 'network_total_down', 'network_total_up', 'state', 'status', 'uptime', 'version'] @ data['monitor_docker'][0]['monitored_conditions'][11]. Got 'health'. (See /config/configuration.yaml, line 1035).

What's wrong?!

ualex73 commented 3 years ago

Did you download a copy from GitHub or are you using HACS? I forgot to publish it on HACS, i just did it. The updated version should be available within 6-12 hours (depends on HACS)

mario-tux commented 3 years ago

Indeed I was using the HACS version: now I updated my installation using the new pushed version in HACS and it started to work. I don't know but maybe it is possible to automatically publish on HACS the version tags from GitHub.