Skip to content

Commit e2e56dc

Browse files
authored
Add new option (home-assistant#6019)
* Add new option * Fix typos
1 parent d2a52b2 commit e2e56dc

File tree

1 file changed

+68
-41
lines changed

1 file changed

+68
-41
lines changed

source/_components/sensor.glances.markdown

Lines changed: 68 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ ha_release: 0.7.3
1616

1717
The `glances` sensor platform is consuming the system information provided by the [Glances](https://github.com/nicolargo/glances) API. This enables one to track remote host and display their stats in Home Assistant.
1818

19+
## {% linkable_title Setup %}
20+
1921
This sensors needs a running instance of `glances` on the host. The minimal supported version of `glances` is 2.3.
2022
To start a Glances RESTful API server on its default port 61208, the a test the following command can be used:
2123

@@ -35,6 +37,8 @@ $ curl -X GET http://IP_ADDRESS:61208/api/2/mem/free
3537

3638
For details about auto-starting `glances`, please refer to [Start Glances through Systemd](https://github.com/nicolargo/glances/wiki/Start-Glances-through-Systemd).
3739

40+
## {% linkable_title Configuration %}
41+
3842
To enable the Glances sensor, add the following lines to your `configuration.yaml`:
3943

4044
```yaml
@@ -44,48 +48,71 @@ sensor:
4448
host: IP_ADDRESS
4549
resources:
4650
- 'disk_use_percent'
47-
- 'disk_use'
48-
- 'disk_free'
49-
- 'memory_use_percent'
50-
- 'memory_use'
51-
- 'memory_free'
52-
- 'swap_use_percent'
53-
- 'swap_use'
54-
- 'swap_free'
55-
- 'processor_load'
56-
- 'process_running'
57-
- 'process_total'
58-
- 'process_thread'
59-
- 'process_sleeping'
60-
- 'cpu_temp'
61-
- 'docker_active'
62-
- 'docker_cpu_use'
63-
- 'docker_memory_use'
6451
```
6552
66-
Configuration variables:
67-
68-
- **host** (*Required*): The IP address of your host, eg. `192.168.1.32`.
69-
- **port** (*Option*): The network port to connect to. Default is `61208`.
70-
- **name** (*Optional*): Name of the Glances sensor.
71-
- **resources** (*Required*): Entries to monitor.
72-
- **disk_use_percent**: Used disk space in percent
73-
- **disk_use**: Used disk space
74-
- **disk_free**: Free disk space
75-
- **memory_use_percent**: Used memory in percent
76-
- **memory_use**: Used memory
77-
- **memory_free**: Free memory
78-
- **swap_use_percent**: Used swap space in percent
79-
- **swap_use**: Used swap space
80-
- **swap_free**: Free swap space
81-
- **processor_load**: Load
82-
- **process_running**: Number of running processes
83-
- **process_total**: Total number of processes
84-
- **process_thread**: Number of threads
85-
- **process_sleeping**: Number of sleeping processes
86-
- **cpu_temp**: CPU Temperature (may not available on all platforms)
87-
- **docker_active**: Count of active Docker containers
88-
- **docker_cpu_use**: Total CPU usage in percent of Docker containers
89-
- **docker_memory_use**: Total memory used of Docker containers
53+
{% configuration %}
54+
host:
55+
description: IP address of the host where Glances is running.
56+
required: false
57+
type: string
58+
default: localhost
59+
port:
60+
description: The port where Glances is listening.
61+
required: false
62+
type: int
63+
default: 61208
64+
name:
65+
description: The prefix for the sensors.
66+
required: false
67+
type: string
68+
default: Glances
69+
version:
70+
description: "The version of the Glances API. Supported version: `2` and `3`."
71+
required: false
72+
type: int
73+
default: 2
74+
resources:
75+
description: Entries to monitor.
76+
required: false
77+
type: map
78+
default: disk_use
79+
keys:
80+
disk_use_percent:
81+
description: The used disk space in percent.
82+
disk_use:
83+
description: The used disk space.
84+
disk_free:
85+
description: The free disk space.
86+
memory_use_percent:
87+
description: The used memory in percent.
88+
memory_use:
89+
description: The used memory.
90+
memory_free:
91+
description: The free memory.
92+
swap_use_percent:
93+
description: The used swap space in percent.
94+
swap_use:
95+
description: The used swap space.
96+
swap_free:
97+
description: The free swap space.
98+
processor_load:
99+
description: The load.
100+
process_running:
101+
description: The number of running processes.
102+
process_total:
103+
description: The total number of processes.
104+
process_thread:
105+
description: The number of threads.
106+
process_sleeping:
107+
description: The number of sleeping processes.
108+
cpu_temp:
109+
description: The CPU temperature (may not be available on all platforms).
110+
docker_active:
111+
description: The count of active Docker containers.
112+
docker_cpu_use:
113+
description: The total CPU usage in percent of Docker containers.
114+
docker_memory_use:
115+
description: The total memory used by Docker containers.
116+
{% endconfiguration %}
90117

91118
Not all platforms are able to provide all metrics. For instance `cpu_temp` is requires installing and configuring `lmsensors` in Ubuntu, and may not be available at all in other platforms.

0 commit comments

Comments
 (0)