/
/
/
1# Glances Monitoring - Home Assistant Integration
2
3## How It Works
4
5When the monitoring role deploys Glances to a host, it automatically generates
6three Home Assistant configuration snippets in `generated/`:
7
8| File | Purpose |
9|------|---------|
10| `<host>-sensors.yaml` | Binary sensor (online status) + REST sensors (system info) |
11| `<host>-chip.yaml` | Overview status chip for the dashboard header |
12| `<host>-section.yaml` | Detail section with metrics cards |
13
14These are also printed as debug output during the playbook run for easy copy-paste.
15
16## Adding a New Host to Home Assistant
17
18### 1. Add the Glances integration
19
20**Settings > Integrations > Add Integration > Glances**
21
22Use the name, host, and port shown in the generated sensor file header.
23Leave SSL disabled, version 3, verify SSL unchecked.
24
25### 2. Add the sensors
26
27Copy the contents of `<host>-sensors.yaml` into your `configuration.yaml`:
28- The `template:` block goes under your existing `template:` section
29- The `rest:` blocks go under your existing `rest:` section (or as new top-level entries)
30
31### 3. Add the dashboard cards
32
33- Copy the chip from `<host>-chip.yaml` into your overview chips card
34- Copy the section from `<host>-section.yaml` into your dashboard view's `sections:` array
35
36## Conditional Features
37
38The generated configs automatically include extra panels when the host has:
39- **GPU monitoring** (`glances_gpu_monitoring: true`) â GPU name, utilization, VRAM cards
40- **RAID monitoring** (`glances_storage_monitoring: true`) â RAID status entity and card
41
42## Customization
43
44Override these variables per host in the playbook:
45
46| Variable | Default | Purpose |
47|----------|---------|---------|
48| `ha_display_name` | hostname (title case) | Display name in dashboard |
49| `ha_integration_name` | hostname (underscored) | Entity ID prefix |
50| `ha_host_icon` | `mdi:server` | Icon for the overview chip |
51
52## Entity Naming
53
54The Glances HA integration creates entities as `sensor.<integration_name>_<metric>`.
55The REST sensors (system info) use `sensor.glances_<integration_name>_<metric>`.
56
57### Standard entities (from Glances integration)
58- `sensor.<name>_cpu_used` â CPU usage %
59- `sensor.<name>_ram_used_percent` â RAM usage %
60- `sensor.<name>_disk_used_percent_slash` â Root disk usage %
61
62### GPU entities (runner only)
63- `sensor.<name>_gpu_0_proc` â GPU utilization %
64- `sensor.<name>_gpu_0_mem` â GPU VRAM usage %
65
66### REST sensor entities (system info)
67- `sensor.glances_<name>_cpu_name` â CPU model name
68- `sensor.glances_<name>_cpu_cores` â Core count
69- `sensor.glances_<name>_memory_total` â Total RAM in GB
70- `sensor.glances_<name>_os` â OS description
71- `sensor.glances_<name>_uptime` â System uptime
72- `sensor.glances_<name>_gpu_name` â GPU model (if GPU enabled)
73- `sensor.glances_<name>_raid_status` â RAID status (if storage enabled)
74
75## Requirements
76
77- [Mushroom Cards](https://github.com/piitaya/lovelace-mushroom) (install via HACS)
78