mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Updated Netdata documentation (#9606)
* Updated Netdata documentation * Added missing `sensor:` tag * Added further examples and rephrased wording * Fixed `JSON` display issue * Fixed issues raised by fabaff reverted `system_load` to `load` modified full example removed comments from example * ✏️ Tweak * ✏️ Tweak * ✏️ Tweak
This commit is contained in:
parent
24dd703d77
commit
1686917201
@ -43,21 +43,45 @@ $ curl -X GET "http://[Netdata_Instance]:19999/api/v1/data?chart=[data_group]&po
|
|||||||
- `dimension_names`: Names shown in the frontend.
|
- `dimension_names`: Names shown in the frontend.
|
||||||
- `dimension_ids`: Names to use for `element`.
|
- `dimension_ids`: Names to use for `element`.
|
||||||
|
|
||||||
|
Alternatively you can browse to the built in Netdata API in your browser `http://[Netdata_Instance]:19999/api/v1/allmetrics?format=json` and search for the `data_group` identified in the Netdata frontend. In the example JSON below the data group is "system.load".
|
||||||
|
|
||||||
|
```json
|
||||||
|
"system.load": {
|
||||||
|
"name":"system.load",
|
||||||
|
"context":"system.load",
|
||||||
|
"units":"load",
|
||||||
|
"last_updated": 1558446920,
|
||||||
|
"dimensions": {
|
||||||
|
"load1": {
|
||||||
|
"name": "load1",
|
||||||
|
"value": 0.1250000
|
||||||
|
},
|
||||||
|
"load5": {
|
||||||
|
"name": "load5",
|
||||||
|
"value": 0.1290000
|
||||||
|
},
|
||||||
|
"load15": {
|
||||||
|
"name": "load15",
|
||||||
|
"value": 0.1430000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
|
Once the `data_group` "system.load" and the `element` "load15" have been identified from the JSON it can be configured in your configuration.yaml like the example below.
|
||||||
|
|
||||||
## {% linkable_title Configuration %}
|
## {% linkable_title Configuration %}
|
||||||
|
|
||||||
To add this platform to your installation, add the following to your `configuration.yaml` file:
|
Add the following to your `configuration.yaml`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
sensor:
|
sensor:
|
||||||
- platform: netdata
|
- platform: netdata
|
||||||
resources:
|
resources:
|
||||||
load:
|
load:
|
||||||
data_group: system.load
|
data_group: system.load
|
||||||
element: load15
|
element: load15
|
||||||
cpu:
|
|
||||||
data_group: system.cpu
|
|
||||||
element: system
|
|
||||||
```
|
```
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
@ -105,3 +129,22 @@ resources:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
### {% linkable_title Full Example %}
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
|
sensor:
|
||||||
|
- platform: netdata
|
||||||
|
host: '192.168.1.2'
|
||||||
|
port: '19999'
|
||||||
|
name: SomeHostName
|
||||||
|
resources:
|
||||||
|
system_load:
|
||||||
|
data_group: system.load
|
||||||
|
element: load15
|
||||||
|
core0_freq:
|
||||||
|
data_group: 'cpu.cpufreq'
|
||||||
|
element: 'cpu0'
|
||||||
|
icon: mdi:chip
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user