System Monitoring - How does yours look?

Why am I not surprised you saw a better way?! :slight_smile:

Thanks, as always.

I should add that it wasn’t my method, I filched it from someone else and had wanted to add an edit to my original post to that effect after it got a few likes, but because I can’t remember who I got it from to credit, never did.

just for educational purposes:

any reason not to use {{ states.automation | list | count }} ?

also, since ive just posted this as a solution to list and count domains, would you shorten that too with this |list|count: {{ states| groupby('domain') | list | count }} (since we need the for loop there anyway)

        value_template: >
          {%- for d in states | groupby('domain') %}
            {% if loop.first %}{{loop.length}} Domains:
            {% endif -%} {{d[0]}},
          {%- endfor %}

It was mine I’m ashamed to say I always find a way to make my templates as long winded as possible.

@petro you need to share your repo with me so I can learn anchors wait till you see my energy consumption template abortion, but hey it works its just really really really long.

3 Likes

Don’t be ashamed, I loved it.

Until @petro came along :stuck_out_tongue_winking_eye:

1 Like

I’ve been working the past 2 weeks to get my system into a cohesive setup. You don’t want to see my set up at the moment because it is very complicated where it doesn’t need to be, I haven’t updated sections since my initial startup (in 2016). I’m trying to streamline every page of my UI while removing stuff that doesn’t work / I don’t need anymore / is getting depreciated. I’m actually pretty close and I hope to have it posted within a week. I just have a bunch of appdaemon automations that I need to update, but I’ll do that after I post it.

EDIT: Here’s the repo, its a work in progress.

3 Likes

Just in case it helps, my post linked below has a simplified anchors example.

1 Like

Thanks man appreciate it, always learning this community is awesome for that.

Does anyone know what would be the best way to obtain system stats such as CPU, temperature, disk usage, etc from a remote Ubuntu 18.x Linux server please?

1 Like

ahh, superb, thank you! @tom_l

Mine’s very simple by comparison to most of the dashboards shown here, but this is mine:

The only custom UI element in use here is the Compact Custom Header.
And in case anyone’s interested in how this is layed out and configured:

  - badges: []
    cards:
      - type: 'custom:compact-custom-header'
        voice: hide
      - cards:
          - entities: []
            show_header_toggle: false
            title: "\U0001F5A5 Debian System Status"
            type: entities
          - cards:
              - entity: sensor.processor_use
                name: CPU Usage
                severity:
                  green: 0
                  red: 90
                  yellow: 65
                title: Processor
                type: gauge
                unit_of_measurement: '%'
              - entity: sensor.memory_use_percent
                name: Memory Usage
                severity:
                  green: 0
                  red: 90
                  yellow: 65
                title: Memory
                type: gauge
                unit_of_measurement: '%'
            type: horizontal-stack
          - cards:
              - Name: Disk Usage
                entity: sensor.disk_use_percent
                name: Disk Usage
                severity:
                  green: 0
                  red: 90
                  yellow: 65
                title: Disk
                type: gauge
                unit_of_measurement: '%'
              - entity: sensor.cpu_temp
                max: 105
                name: CPU Temp
                severity:
                  green: 0
                  red: 90
                  yellow: 70
                title: CPU Temp
                type: gauge
                unit_of_measurement: °C
            type: horizontal-stack
        type: vertical-stack
      - cards:
          - entities: []
            show_header_toggle: false
            title: "\U0001F5A5 Synology Status"
            type: entities
          - cards:
              - entity: sensor.cpu_load_total
                name: CPU Usage
                severity:
                  green: 0
                  red: 90
                  yellow: 65
                title: Processor
                type: gauge
                unit_of_measurement: '%'
              - entity: sensor.memory_usage_real
                name: Memory Usage
                severity:
                  green: 0
                  red: 90
                  yellow: 65
                title: Memory
                type: gauge
                unit_of_measurement: '%'
            type: horizontal-stack
          - cards:
              - entity: sensor.volume_used_volume_1
                name: Volume Usage
                severity:
                  green: 0
                  red: 90
                  yellow: 65
                title: Disk
                type: gauge
                unit_of_measurement: '%'
              - entity: sensor.temperature_sda
                max: 105
                name: Disk Temp
                severity:
                  green: 0
                  red: 90
                  yellow: 65
                type: gauge
                unit_of_measurement: °C
            type: horizontal-stack
        type: vertical-stack
      - cards:
          - entities: []
            show_header_toggle: false
            title: "\U0001F5A5 USG Status"
            type: entities
          - cards:
              - entity: sensor.unifi_gateway_wan_cpu
                name: CPU Usage
                severity:
                  green: 0
                  red: 90
                  yellow: 65
                title: Processor
                type: gauge
                unit_of_measurement: '%'
              - entity: sensor.unifi_gateway_wan_mem
                name: Memory Usage
                severity:
                  green: 0
                  red: 90
                  yellow: 65
                title: Memory
                type: gauge
                unit_of_measurement: '%'
            type: horizontal-stack
          - cards:
              - entity: sensor.unifi_gateway_firmware_upgradable
                name: Updates
                type: sensor
              - entity: sensor.unifi_gateway_alerts
                name: Alerts
                type: sensor
                unit_of_measurement: °C
            type: horizontal-stack
        type: vertical-stack
      - entities:
          - entity: sensor.plex
          - entity: sensor.nginx_service_status
          - entity: sensor.plex_service_status
        show_name: true
        show_state: true
        type: glance
      - entities:
          - entity: sensor.ssl_certificate_expiry
        type: entities
      - entities:
          - entity: sensor.status_smart_sda
          - entity: sensor.status_smart_sdb
          - entity: sensor.status_smart_sdc
          - entity: sensor.status_smart_sdd
        show_header_toggle: false
        title: Disk Health
        type: entities
    icon: 'mdi:server-network'
    id: Settings
    title: Network and Monitoring

Simple is good. You can see what you need to at a glance.

How did you get the usg cpu , memory data and update data? Can you share? Thanks

Always happy to share! :slight_smile:

I used the custom Unifi Gateway component and added the templates for the USG hardware stats as per gohassgo’s helpful post here.

1 Like

I got my usage stats from system monitor, not glances. Didn’t even know about glances. Learn something new every day.

image

although I just noticed that my uptime is wrong, that’s hassio uptime, not system uptime. Gotta fix that.

3 Likes

looks great, would you mind share the code?

Looks great except your temperature is in the wrong format :wink:

1 Like

It’s really annoying that you can’t have ºF and ºC. I like my outside temp in ºF and device temps in ºC. Oh well. I’m ok with this though.

Why not using a sensor template to convert from F to C or vice versa? That should be quite easy, I guess

HA automatically takes any temperature and converts it to your system temperature units. I have my system units set as ºF. I suppose I could remove the conversion in a template, keep it with ºF in the graphs and just change the display on the card. But that’s not worth the effort IMO.

1 Like