System Monitoring - How does yours look?

Mine is still a work in progress need to sort out some of the NAS resource monitoring and work out where I can squeeze in room for some more devices.

9 Likes

That looks great. I really want to apply transparency to my card backgrounds but it does not play nice with the vertical-stack-in-card.

Also sorry @Yoinkz, I missed this:

I use this sensor for MariaDB:

- platform: sql
  db_url: !secret mariadb_url
  queries:
  - name: Database Size
    query: 'SELECT table_schema "database", Round(Sum(data_length + index_length) / 1048576, 2) "value" FROM information_schema.tables WHERE table_schema="homeassistant" GROUP BY table_schema'
    column: 'value'
    unit_of_measurement: MB

Can’t take credit for it but also can’t remember where it came from.

If you’re using the SQL database this sensor is what you want: File Size - Home Assistant (with exact example you need).

9 Likes

Thanks @tom_l, really this whole page is made using the vertical-stack-in-card.

1 Like

It’s the mini graph cards that stuff it up. They dont’ get the transparency applied to their background, it all gets transparent. Also the cumulative effect of two 25% transparencies mismatches with other cards.

1 Like

Yeah I had Noticed that so I took the graphs out. You could use card modder to supersede the cards transparency?

how do you handle mqtt topics, do you need to restart each topic when your homeassistant reboots or do they retain their position and keep sending topics?

All of my topics are retained, however restarting HA doesn’t effect them as my MQTT Server is hosted on another machine.

Even using the Hassio Mosquitto addon this should not matter, if the topics are retained. The MQTT broker is in it’s own Docker container restarting HA does not affect the broker. Only restarting the host system would do that.

Wow - that really looks nice!

2 Likes

16 Likes

Looks really nice as well.

Can you share your lovelace config?
I want to see how you have made the NUC Part where you have both the Diagrams and Bar Charts in the same Stack.

1 Like

I’m interested in the NUC CPU temperature sensor.

      - type: custom:vertical-stack-in-card
        cards:
          - type: entities
            title: NUC
            show_header_toggle: false
            entities:
              - entity: sensor.last_boot
                name: Last boot
                icon: mdi:clock
              - entity: binary_sensor.internet
          - type: horizontal-stack
            cards:
              - type: custom:mini-graph-card
                entities:
                  - entity: sensor.processor_use
                    name: CPU
                icon: mdi:memory
                color_thresholds:
                  - value: 0
                    color: '#40bf40'
                  - value: 10
                    color: '#ffde00'
                  - value: 50
                    color: '#bf4040'
              - type: custom:mini-graph-card
                entities:
                  - entity: sensor.cpu_temperature
                    name: CPU Temperature
                decimals: 0
                color_thresholds:
                  - value: 0
                    color: '#cccccc'
                  - value: 60
                    color: '#ffde00'
                  - value: 60
                    color: '#bf4040'
          - type: custom:bar-card
            entities:
              - entity: sensor.disk_use_percent
                icon: mdi:harddisk
                title: HDD
                severity:
                - value: 50
                  color: '#40bf40'
                - value: 80
                  color: '#ffde00'
                - value: 100
                  color: '#bf4040'
              - entity: sensor.memory_use_percent
                icon: mdi:memory
                title: RAM
                severity:
                - value: 20
                  color: '#40bf40'
                - value: 50
                  color: 'var(--primary-color)'
                - value: 100
                  color: '#bf4040'
            height: 40px
            columns: 1
            entity_config: true
            show_icon: true
            title_position: inside
            # title_position: 'off'
            align: split
            rounding: 5px
            padding: 5px
            background_style:
              background: "#000"
              opacity: 0.05
            icon_style:
              height: 34px
              width: 34px
              filter: "none"
            value_style:
              text-shadow: "none"
              font-size: "18px"
              font-weight: "normal"
              color: "var(--primary-text-color)"
            title_style:
              text-shadow: "none"
              color: "var(--primary-text-color)"
              # color: "#fff"
              font-weight: "normal"
7 Likes

Form NUC Temperature sensor on Debian/Ubuntu

- platform: command_line

name: CPU Temperature
command: “cat /sys/class/thermal/thermal_zone1/temp”
unit_of_measurement: “°C”
value_template: ‘{{ value | multiply(0.001) | round(1) }}’

2 Likes

Nice job could you tell me how you calculate mikrotik uptime? I am pulling it via snmp oid and was unsure how to convert to use able format.

Sure :slight_smile:

- platform: snmp

name: “Mikrotik Uptime”
host: 192.168.1.1
baseoid: 1.3.6.1.2.1.1.3.0
community: x
accept_errors: True
scan_interval: 60
value_template: >-
{% set time = (value | int) | int %}
{% set minutes = ((time % 360000) / 6000) | int%}
{% set hours = ((time % 8640000) / 360000) | int %}
{% set days = (time / 8640000) | int %}

{%- if time < 60 -%}
  Mai putin de 1 min
  {%- else -%}
  {%- if days > 0 -%}
    {{ days }}zi
  {%- endif -%}
  {%- if hours > 0 -%}
    {%- if days > 0 -%}
      {{ ' ' }}
    {%- endif -%}
    {{ hours }}ore
  {%- endif -%}
  {%- if minutes > 0 -%}
    {%- if days > 0 or hours > 0 -%}
      {{ ' ' }}
    {%- endif -%}
    {{ minutes }}min
  {%- endif -%}
{%- endif -%}
1 Like

Legend thanks for this, does your Mikrotik have more then 1 CPU? Mine has 9 but I just want total CPU use I was able to extract all CPU individually but I’m sure there is an oid for total CPU?

Sorry. My mikrotik has only one cpu and i dont know an average cpu oid, but i think that you could make individual sensors and divide it

{{ ((states('sensor.asustor_cpu_1') | float +  states('sensor.asustor_cpu_2') | float ) / 2 ) | round }}
1 Like

I was just about to go down this route but trolled the mikrotik forums and found this
1.3.6.1.4.1.2021.11.10.0