-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dashboard.yaml
237 lines (214 loc) · 7.65 KB
/
dashboard.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
web_ui:
# https://github.com/vodolaz095/dashboard/blob/master/docs/deployment.md
listen: "127.0.0.1:3000"
domain: "localhost"
header_for_client_ip: "CF-Connecting-IP"
trust_proxies:
- "127.0.0.1"
# https://github.com/vodolaz095/dashboard/blob/master/docs/ui_customization.md
title: "dashboard"
description: "dashboard"
keywords:
- "dashboard"
- "vodolaz095"
- "golang"
- "redis"
- "postgresql"
- "mysql"
do_index: true # allow search engine bots to scrape dashboard
path_to_header: ./contrib/header.html
path_to_footer: ./contrib/footer.html
# https://github.com/vodolaz095/dashboard/blob/master/docs/logging.md
log:
level: trace # can be trace, debug, info, warn, error, fatal
to_journald: false # if enabled, data is send to journald socket instead of STDOUT
# https://github.com/vodolaz095/dashboard/blob/master/docs/connection_pool.md
database_connections:
- name: redis@container
type: redis
connection_string: "redis://127.0.0.1:6379"
- name: subscribe2redis@container
type: redis
connection_string: "redis://127.0.0.1:6379"
- name: mysql@container
type: mysql
connection_string: "root:dashboard@tcp(127.0.0.1:3306)/dashboard"
- name: postgres@container
type: postgres
connection_string: "postgres://dashboard:[email protected]:5432/dashboard"
sensors:
# shared sensor parameters
# https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_shared.md
# for each sensor `link` field value will lead to documentation
- name: load1
type: load1
description: "Get system load average during last minute"
refresh_rate: 5s
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_linux_system.md"
tags:
kind: load
- name: load5
type: load5
description: "Get system load average during last 5 minutes"
refresh_rate: 5s
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_linux_system.md"
tags:
kind: load
- name: load15
type: load15
description: "Get system load average during last 15 minutes"
refresh_rate: 5s
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_linux_system.md"
tags:
kind: load
- name: process
type: process
description: "Number of currently running processes"
refresh_rate: 5s
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_linux_system.md"
- name: free_ram
type: free_ram
description: "Current free Random Access Memory volume in megabytes"
refresh_rate: 5s
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_linux_system.md"
minimum: 500
maximum: 8000
# disk space sensors
- name: free_home
type: free_disk_space
description: "Size of free space in megabytes in /home directory"
path_to_mount_point: /home
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_linux_system.md"
- name: used_home
type: used_disk_space
description: "Size of used disk space in megabytes in /home directory"
path_to_mount_point: /home
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_linux_system.md"
- name: ratio_home
type: free_disk_space_ratio
description: "Free space ratio for /home directory in percents"
path_to_mount_point: /home
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_linux_system.md"
- name: echo
type: shell
command: "date +%S"
description: "Get current second executing `date` command"
refresh_rate: 5s
minimum: 0
maximum: 60
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_shell.md"
tags:
a: b
c: d
- name: endpoint
type: endpoint
description: "Update value by incoming POST request"
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_endpoint.md"
token: "test321"
- name: redis
type: redis
description: "Get value of redis key a"
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_redis.md"
connection_name: "redis@container"
query: "get a"
refresh_rate: 5s
tags:
dialect: redis
kind: database
- name: mysql
type: mysql
description: "Select random number from range"
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_sql.md"
connection_name: "mysql@container"
query: "SELECT rand()*99+1 as random"
minimum: 30
maximum: 60
refresh_rate: 5s
tags:
dialect: sql
kind: database
- name: postgres
type: postgres
description: "Select random number from range"
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_sql.md"
connection_name: "postgres@container"
query: "SELECT random()*99+1 as random"
minimum: 30
maximum: 60
refresh_rate: 5s
tags:
dialect: sql
kind: database
- name: thermal0
type: file
description: "Get thermal sensor status from area 0"
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_file.md"
path_to_reading: /sys/class/thermal/thermal_zone0/temp
a: 0.001
b: 0
minimum: 1
maximum: 100
refresh_rate: 5s
tags:
kind: thermal
- name: redis subscriber
type: subscriber
description: "Subscribe to redis channel and get values from it"
channel: "vodolaz095/dashboard/subscriber"
connection_name: "subscribe2redis@container"
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_redis.md"
value_only: true
minimum: 1
maximum: 100
tags:
dialect: redis
kind: database
- name: victoria metrics1
type: victoria_metrics
description: "Fetch timeseries data from Victoria Metrics"
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_victoria_metrics.md"
endpoint: "http://localhost:8428/"
query: '{instance="steel"}'
filter:
__name__: "file1"
refresh_rate: 5s
tags:
dialect: promql
kind: database
- name: victoria metrics2
type: victoria_metrics
description: "Fetch timeseries data from Victoria Metrics"
link: "https://github.com/vodolaz095/dashboard/blob/master/docs/sensor_victoria_metrics.md"
endpoint: "http://localhost:8428/"
query: '{instance="steel", __name__="file1"}'
refresh_rate: 5s
tags:
dialect: promql
kind: database
# https://github.com/vodolaz095/dashboard/blob/master/docs/export_redis.md
# https://github.com/vodolaz095/dashboard/blob/master/docs/linking_via_redis.md
broadcasters:
# this broadcaster sends readings of sensors `mysql`,`postgres`,`redis` into
# channels of `vodolaz095/dashboard/sensor/mysql`, `vodolaz095/dashboard/sensor/postgres` and
# `vodolaz095/dashboard/sensor/redis` using JSON format like this one
# { "name":"mysql", "value":123.53, "error":"", "timestamp":"2024-07-06T16:23:07.542506974+03:00" }
- connection_name: redis@container
subject: "vodolaz095/dashboard/sensor/%s"
value_only: false
sensors_to_listen:
- mysql
- postgres
- redis
# this broadcaster sends readings of all sensors
# channels of `vodolaz095/dashboard/value/redis` and so on, where `redis` is name of sensor,
# using string with float64 value - like this one: 123.53
- connection_name: redis@container
subject: "vodolaz095/dashboard/value/%s"
value_only: true
# this broadcaster sends all sensors readings into InfluxDB using wire protocol
# https://github.com/vodolaz095/dashboard/blob/master/docs/export_influx.md
influx:
endpoint: http://127.0.0.1:8086
token: "-l3Y5tIHGJAxXv_Rs5kJ4kAfPbgmf3WPmFUTDuKmD3Z9gp29E7e188-dIt5MAKhSTzv1J6v_pkPuVdIbXqdL1w=="
organization: dashboard
bucket: dashboard