-
Notifications
You must be signed in to change notification settings - Fork 5
/
configuration.yaml
128 lines (121 loc) · 5.15 KB
/
configuration.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# OpenWRT collectd
mqtt:
sensor:
- name: OpenWRT RAM buffered
state_topic: collectd/OpenWrt/memory/memory-buffered
unit_of_measurement: MB
value_template: "{{ value.split(':')[1].split('\x00')[0] | float / 1000000 }}"
unique_id: ram_buffered
- name: OpenWRT RAM free
state_topic: collectd/OpenWrt/memory/memory-free
unit_of_measurement: MB
value_template: "{{ value.split(':')[1].split('\x00')[0] | float / 1000000 }}"
unique_id: ram_free
- name: OpenWRT RAM cached
state_topic: collectd/OpenWrt/memory/memory-cached
unit_of_measurement: MB
value_template: "{{ value.split(':')[1].split('\x00')[0] | float / 1000000 }}"
unique_id: ram_cached
- name: OpenWRT RAM used
state_topic: collectd/OpenWrt/memory/memory-used
unit_of_measurement: MB
value_template: "{{ value.split(':')[1].split('\x00')[0] | float / 1000000 }}"
unique_id: ram_used
# load
- name: OpenWRT L1
unit_of_measurement: load
state_topic: collectd/OpenWrt/load/load
value_template: "{{ value.split(':')[1] | float }}"
unique_id: L1
- name: OpenWRT L5
unit_of_measurement: load
state_topic: collectd/OpenWrt/load/load
value_template: "{{ value.split(':')[2] | float }}"
unique_id: L5
- name: OpenWRT L15
unit_of_measurement: load
state_topic: collectd/OpenWrt/load/load
value_template: "{{ value.split(':')[3].split('\x00')[0] | float }}"
unique_id: L15
# br-lan interface
- name: OpenWRT br-lan errors
state_topic: collectd/OpenWrt/interface-br-lan/if_errors
unit_of_measurement: packets
value_template: "{{ value.split(':')[1] | int + value.split(':')[2].split('\x00')[0] | int }}"
unique_id: br-lan-errors
- name: OpenWRT br-lan dropped
state_topic: collectd/OpenWrt/interface-br-lan/if_dropped
unit_of_measurement: packets
value_template: "{{ value.split(':')[1] | int + value.split(':')[2].split('\x00')[0] | int }}"
unique_id: br-lan-dropped
- name: OpenWRT br-lan TX MB/s
state_topic: collectd/OpenWrt/interface-br-lan/if_octets
unit_of_measurement: MB/s
value_template: "{{ value.split(':')[1] | float / 1048576}}"
unique_id: br-lan-tx-transfer
- name: OpenWRT br-lan RX MB/s
state_topic: collectd/OpenWrt/interface-br-lan/if_octets
unit_of_measurement: MB/s
value_template: "{{ value.split(':')[2].split('\x00')[0] | float / 1048576 }}"
unique_id: br-lan-rx-transfer
- name: OpenWRT br-lan packets
state_topic: collectd/OpenWrt/interface-br-lan/if_packets
unit_of_measurement: packets/s
value_template: "{{ value.split(':')[1] | int + value.split(':')[2].split('\x00')[0] | int }}"
unique_id: br-lan-packets
# wg interface
- name: OpenWRT wg errors
state_topic: collectd/OpenWrt/interface-wg/if_errors
unit_of_measurement: packets
value_template: "{{ value.split(':')[1] | int + value.split(':')[2].split('\x00')[0] | int }}"
unique_id: wg-errors
- name: OpenWRT wg dropped
state_topic: collectd/OpenWrt/interface-wg/if_dropped
unit_of_measurement: packets
value_template: "{{ value.split(':')[1] | int + value.split(':')[2].split('\x00')[0] | int | int }}"
unique_id: wg-dropped
- name: OpenWRT wg TX MB/s
state_topic: collectd/OpenWrt/interface-wg/if_octets
unit_of_measurement: MB/s
value_template: "{{ value.split(':')[1] | float / 1048576}}"
unique_id: wg-tx-transfer
- name: OpenWRT wg RX MB/s
state_topic: collectd/OpenWrt/interface-wg/if_octets
unit_of_measurement: MB/s
value_template: "{{ value.split(':')[2].split('\x00')[0] | float / 1048576 }}"
unique_id: wg-rx-transfer
- name: OpenWRT wg packets
state_topic: collectd/OpenWrt/interface-wg/if_packets
unit_of_measurement: packets/s
value_template: "{{ value.split(':')[1] | int + value.split(':')[2].split('\x00')[0] | int }}"
unique_id: wg-packets
# uptime
- name: OpenWRT uptime
state_topic: collectd/OpenWrt/uptime/uptime
unit_of_measurement: days
value_template: "{{ value.split(':')[1].split('\x00')[0] | int / 86400 | round(2) }}"
unique_id: ap_uptime
# ping
- name: OpenWRT google ping
state_topic: collectd/OpenWrt/ping/ping-8.8.8.8
unit_of_measurement: ms
value_template: "{{ value.split(':')[1].split('\x00')[0] | float | round(2) }}"
unique_id: ap_ping
# connections
- name: OpenWRT connections
state_topic: collectd/OpenWrt/conntrack/conntrack
unit_of_measurement: connections
value_template: "{{ value.split(':')[1].split('\x00')[0] | int }}"
unique_id: ap_connections
# 2.4 clients
- name: OpenWRT clients
state_topic: collectd/OpenWrt/iwinfo-wlan1/stations
unit_of_measurement: clients
value_template: "{{ value.split(':')[1].split('\x00')[0] | int }}"
unique_id: ap_clients
# temperature
- name: OpenWRT temperatura
state_topic: collectd/OpenWrt/thermal-thermal_zone9/temperature
unit_of_measurement: °C
value_template: "{{ value.split(':')[1].split('\x00')[0] | int }}"
unique_id: ap_temp