You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_components/sensor.glances.markdown
+68-41Lines changed: 68 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,8 @@ ha_release: 0.7.3
16
16
17
17
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.
18
18
19
+
## {% linkable_title Setup %}
20
+
19
21
This sensors needs a running instance of `glances` on the host. The minimal supported version of `glances` is 2.3.
20
22
To start a Glances RESTful API server on its default port 61208, the a test the following command can be used:
21
23
@@ -35,6 +37,8 @@ $ curl -X GET http://IP_ADDRESS:61208/api/2/mem/free
35
37
36
38
For details about auto-starting `glances`, please refer to [Start Glances through Systemd](https://github.com/nicolargo/glances/wiki/Start-Glances-through-Systemd).
37
39
40
+
## {% linkable_title Configuration %}
41
+
38
42
To enable the Glances sensor, add the following lines to your `configuration.yaml`:
39
43
40
44
```yaml
@@ -44,48 +48,71 @@ sensor:
44
48
host: IP_ADDRESS
45
49
resources:
46
50
- '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'
64
51
```
65
52
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 %}
90
117
91
118
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