System Monitoring - How does yours look?

This looks awesome! Can you share your lovelace config?

Thanks. Sure you can find it all here.

How did you monitor your docker containers?

Check out docker monitor.

I’m on it. But it cant get it running.
Using hassio on rpi3.

Found this: Docker Monitor sensor for Home Assistant
But where do i enter these commands? The ssh addon dont let me edit the system.

At the moment in only got these

Logger: custom_components.monitor_docker.helpers
Source: custom_components/monitor_docker/helpers.py:140
Integration: Monitor Docker (documentation, issues)
First occurred: 11:53:12 (1 occurrences)
Last logged: 11:53:12

Can not connect to Docker API (Missing valid docker_host.Either DOCKER_HOST or local sockets are not available.)

Traceback (most recent call last): File “/config/custom_components/monitor_docker/helpers.py”, line 140, in init self._api = aiodocker.Docker(url=url) File “/usr/local/lib/python3.8/site-packages/aiodocker/docker.py”, line 95, in init raise ValueError( ValueError: Missing valid docker_host.Either DOCKER_HOST or local sockets are not available.

Doesn’t work on Home Assistant OS (the term hassio has been deprecated for quite some time now). You can get the stats of the add-ons, see the link here posted by Tom.

OK :cry:

Will try to connect to my external docker. It is more important then the hassOS containers.

Maybe this is the time where im move from hassOS to a docker on my server.
How complicated is it, to connect zwave and zigbee sticks to a hass-docker?

This should be possible with monitor docker as far as I understood.

Not complicated at all, had it running like this for years before I move the sticks to a separate Pi.

One instance with hassOS for the sticks which communicates with another instance?
I am thinking about that. Because the server is located as far possible away from the devices.

It is running smooth and fast?

No HA instance, just a Pi 3 with an Aeotec stick and a ConBee II stick and the respective software (OZWDaemon for Z-Wave which communicates to HA via MQTT and DeCONZ for ZigBee which communicates to HA via websocket. I wrote a detailed guide on how I did it here.

Yes, working perfectly fine for around 6 months I think.

Hi , i installed docker proxy on the nas , but when i ssh on the rpi and i try docker -H i get docker invalid command.

i also installed monitor docker , but nothing shows up. i have no idea.
I have 8 dockers running under synology docker , i have portainer on it and i can see all the dockers , but from HA nothing

any help?
thanks

Just found a typo in your automations view, you have Automations - Sysyem

1 Like

I went a completely different way than most people here with my system monitor. I like minimalist interfaces that show only relevant information. If everything is operating normally on my system, then I’m not interested in seeing anything about it. What I want to see is if there is an issue that needs my attention.

So when things are good, my system monitor looks like this:


I had to artificially create some issues by unplugging a network cable and changing some warning thresholds :slightly_smiling_face:

image

I simply used a filter card with per entity state filters to recognize anomalies. Serious problems will also trigger an automation that sends me a notification on my phone.

1 Like

Thanks. Fixed.

Hi,

would you mind to share your config?

This approach is what we usually use at work and is quite interesting when you’ve a lot of sensors.

Monitor docker needs to be installed on the Pi with Home Assistant. Then in the monitor docker configuration you need to add the URL like this:

monitor_docker:
  - name: RemoteDocker
    url: tcp://ip-of-your-nas:2375

I have this but no entities…

monitor_docker:
  - name: Docker
    url: tcp://192.168.0.10:2376
    scan_interval: 30
    containers:
      - portainer
    # rename:
    #   appdaemon: AppDaemon
    monitored_conditions:
      - version
      - containers_running
      - containers_total
      - state
      - status
      - memory  
      - containers_cpu_percentage
      - containers_memory_percentage       
      - cpu_percentage
      - memory_percentage

You have to modify your systemd file to utilize the -H parameter.

File: /etc/systemd/system/multi-user.target.wants/docker.service

Example:

ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375 --containerd=/run/containerd/containerd.sock

Full file:

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service containerd.service
Wants=network-online.target
Requires=docker.socket

[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375 --containerd=/run/containerd/containerd.sock
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always

# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
# Both the old, and new location are accepted by systemd 229 and up, so using the old location
# to make them work for either version of systemd.
StartLimitBurst=3

# Note that StartLimitInterval was renamed to StartLimitIntervalSec in systemd 230.
# Both the old, and new name are accepted by systemd 230 and up, so using the old name to make
# this option work for either version of systemd.
StartLimitInterval=60s

# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity

# Comment TasksMax if your systemd version does not support it.
# Only systemd 226 and above support this option.
TasksMax=infinity

# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes

# kill only the docker process, not all processes in the cgroup
KillMode=process

[Install]
WantedBy=multi-user.target
3 Likes

Thank you so much for this! It’s beautifull!
How do you make the sensors:

  • entity: sensor.supervisor_updates
  • entity: sensor.snapshot_backup

The other sensors i found by google search :slight_smile:

image

  - platform: systemmonitor
    resources:
      - type: disk_use
        arg: /
      - type: disk_use_percent
        arg: /
      - type: disk_free
        arg: /
      - type: memory_use_percent
      - type: memory_use
      - type: memory_free
      - type: swap_use_percent
      - type: swap_free
      - type: load_1m
      - type: load_5m
      - type: load_15m
      - type: swap_free
      - type: swap_free
      - type: processor_use
      - type: processor_temperature
      - type: last_boot

# https://www.home-assistant.io/integrations/uptime/

  - platform: uptime
#  - platform: version

# https://community.home-assistant.io/t/updater-card-to-show-new-version/100923/7?u=mikael_kristensen
  #==============================
  #=== Installed hass.io version
  #==============================
  - platform: version
    name: Current Version

  #================================
  #=== Latest Available HA Version
  #================================
  - platform: version
    name: Latest Available Version
    beta: false
    image: raspberrypi3
    source: hassio
    
    

What theme are you using. It’s stunning.