System Monitoring - How does yours look?

It’s hard coded in the sensor I’m afraid, I didn’t put it there.
You could create a custom button to mimic the entity line and then configure it yourself.
Or even easier of course, a template sensor.

1 Like

Okay I’ll try it with a template.

I’ve one other question and hope some one can help me to create a version sensor for synology DSM

I found the following from the command line:

more /etc.defaults/VERSION

Which results in:
majorversion="6"
minorversion="2"
productversion="6.2.3"
buildphase="GM"
buildnumber="25426"
smallfixnumber="0"
builddate="2020/05/12"
buildtime="06:20:24"
Which translates to:
DSM 6.2.3-25426 update 0

2 Likes

Does docker monitor include Glances and HA-dockermoon or they need to be installed separately?

How to install this docker-monitor?

@valvex Congrats. Looks good. Would you mind sharing your lovelace config. Especially for the Wall Tablet in the middle of the screen or the System in the upper left.

1 Like

Hey, thanks!
The wall tablet is an Android tablet that runs the Fully Kiosk Browser.
I have enabled the mqtt service which provides several info every minute.

For example,

- platform: mqtt
  name: 'Tablet Battery'
  state_topic: 'fully/deviceInfo/my_device_ID'
  device_class: battery
  value_template: "{{ value_json.batteryLevel }}"
  json_attributes_topic: 'fully/deviceInfo/my_device_ID'
  unit_of_measurement: '%'

As for the action commands, Fully has a REST API which I can directly call with shell commands.
For example,

shell_command:
    wake_tablet: 'curl -X GET "http://192.168.1.*/?cmd=screenOn&password=*****"'  

Also, Fully provides a real time screenshot of the tablet’s screen which i have added as a camera.

camera:
    - platform: generic
      name: Tablet 
      still_image_url: http://192.168.1.**/?cmd=getScreenshot&password=****    

Finally, that’s the lovelace card (using multiple-entity-row and paper-buttons-row custom cards)

type: entities
entities:
      - entities:
          - entity: switch.sf_tablet ### That's a sonoff running ESPHome that controls the tablet charger ###
            name: Power
          - entity: binary_sensor.tablet_screen
            name: Screen
          - entity: sensor.tablet_reloads
            name: Reloads
          - entity: sensor.tablet_touches
            name: Touches
        entity: sensor.tablet_battery
        icon: 'mdi:tablet-android'
        name: Wall Tablet
        secondary_info:
          entity: sensor.tablet_battery
          name: 'Battery:'
        show_state: false
        type: 'custom:multiple-entity-row'
      - buttons:
          - icon: 'mdi:television'
            name: Screenshot
            tap_action:
              action: more-info
              entity: camera.tablet_2
          - icon: 'mdi:monitor-screenshot'
            name: Wake
            tap_action:
              action: call-service
              confirmation:
                text: Confirm
              service: shell_command.wake_tablet
        type: 'custom:paper-buttons-row'
      - buttons:
          - icon: 'mdi:restart'
            name: Restart
            tap_action:
              action: call-service
              confirmation:
                text: Confirm
              service: shell_command.restart_tablet
          - icon: 'mdi:reload'
            name: Reload
            tap_action:
              action: call-service
              confirmation:
                text: Confirm
              service: shell_command.reload_tablet
        type: 'custom:paper-buttons-row'

Now, for the system part.
I run homeassistant core in a python virtual environment on a Windows PC.
So for the system stats i use the openhardware monitor integration.
For info such as the network usage, the reboot and screenshot commands, i use this custom integration.
I won’t elaborate much, since these are mostly Windows specific, but If you read the docs, everyting is greatly explained.
Let me know for anything else.

5 Likes

Didn’t need to install anything else. You just need to give HA access to docker.sock.

Thanks for reply!

Does Docker Monitor have full Glances and HA-dockermon dockers combined together, which means I can play with Glances integration like on a seperate Glances docker? I plan to install Glances docker as well, but do not want to, if “Docker Minitor” has full Glances too.

I don’t think it has full glances. But I’m not sure…
The setup you are saying is exactly what I have. I have glances container separate but only to check the visual dashboard it provides. I haven’t tried integrating that one which would have more features.

Are you able to post your config.yaml for docker monitor as I’m trying to install and I get an error saying

Invalid config for [docker_monitor]: [hosts] is an invalid option for [docker_monitor]. Check: docker_monitor->docker_monitor->hosts. (See /config/configuration.yaml, line 128). Please check the docs at https://github.com/Sanderhuisman/docker_monitor

This is my config which I’ve basically copied and pasted so not sure why there is an error.

docker_monitor:
  hosts:
    - url: unix:///var/run/docker.sock
      name: Docker
      event: true
      monitored_conditions:
        - version
      containers:
        plex:
          switch: False
          sensors:
            - status
            - uptime
            - cpu_percentage_usage
            - memory_usage
            - memory_percentage_usage
            - network_total_up
            - network_total_down

The three /// is intentional as I’ve copied that from my portainer config in the compose yaml as that seems to work.

Sure!! Here you go:

#################
## DOCKER MON ##
docker_monitor:
  scan_interval: 10
  events: true
  url: unix://var/run/docker.sock
  containers:
    - hassio
    - plex
    - openvpn-as
    - letsencrypt
    - watchtower
    - mosquitto
  monitored_conditions:
    - utilization_version
    - container_status
    - container_memory_usage
    - container_memory_percentage_usage
    - container_cpu_percentage_usage
    - container_network_speed_down
    - container_network_speed_up 

And this is my docker compose:

version: "2"
services:
  hassio:
    image: homeassistant/home-assistant:stable
    container_name: hassio
    restart: unless-stopped
    network_mode: host
    volumes:
      - /home/ee02217/docker/hassio:/config
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Lisbon

Thanks so much, I think I have it working, does it expose the monitored conditions as a sensor or an entity that you add to a card?

It exposes sensors to monitor and switches to control the stop and start of containers.

Hmm maybe I havent got it working then as I can’t see any sensors…

Can you share your docker compose (or volume binding configuration) for Home Assistant and the configuration of the addon?

Also, are there any errors on your logs?

Sure, config for the addon is below:

docker_monitor:
  url: unix://var/run/docker.sock
  scan_interval: 10
  events: true
  name: Docker
  containers:
    - plex:
  monitored_conditions:
    - utilization_version
    - container_status
    - container_memory_usage
    - container_memory_percentage_usage
    - container_cpu_percentage_usage
    - container_network_speed_down
    - container_network_speed_up

My docker compose snippet is below as well

 homeassistant:
    container_name: home-assistant
    image: homeassistant/home-assistant:stable
    volumes:
      - ${USERDIR}/docker/homeassistant/config:/config
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - TZ=${TZ}
      - PUID=${PUID}
      - PGID=${PGID}
    restart: unless-stopped
    network_mode: host

I downloaded the zip from the github repo for docker monitor and put it in my custom components folder also?

I see an issue there after Plex. It should be without “:”

docker_monitor:
  url: unix://var/run/docker.sock
  scan_interval: 10
  events: true
  name: Docker
  containers:
    - plex
  monitored_conditions:
    - utilization_version
    - container_status
    - container_memory_usage
    - container_memory_percentage_usage
    - container_cpu_percentage_usage
    - container_network_speed_down
    - container_network_speed_up

Please also confirm that your plex container is really called “plex”.

Regarding the installation I did it through HACS.

Thanks for the replies, all working now!

Still a few more tweaks needed but nearly completed!

8 Likes

4 Likes