-
Notifications
You must be signed in to change notification settings - Fork 158
/
sensu_go.yml
367 lines (367 loc) · 10.8 KB
/
sensu_go.yml
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
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
---
apiVersion: influxdata.com/v2alpha1
kind: Label
metadata:
name: sensu-go-template
spec:
name: Sensu Go Template
color: '#7A65F2'
---
apiVersion: influxdata.com/v2alpha1
kind: Label
metadata:
name: outputs-influxdb-v2
spec:
name: outputs.influxdb_v2
color: '#108174'
---
apiVersion: influxdata.com/v2alpha1
kind: Label
metadata:
name: inputs-prometheus
spec:
name: inputs.prometheus
color: '#326BBA'
---
apiVersion: influxdata.com/v2alpha1
kind: Bucket
metadata:
name: telegraf
spec:
name: telegraf
retentionRules:
- everySeconds: 604800
type: expire
---
apiVersion: influxdata.com/v2alpha1
kind: Variable
metadata:
name: bucket
spec:
associations:
- kind: Label
name: sensu-go-template
language: flux
name: bucket
query: |-
buckets()
|> filter(fn: (r) => r.name !~ /^_/)
|> rename(columns: {name: "_value"})
|> keep(columns: ["_value"])
type: query
---
apiVersion: influxdata.com/v2alpha1
kind: Telegraf
metadata:
name: sensu-go-monitoring
spec:
name: Sensu Go Monitoring
associations:
- kind: Label
name: outputs-influxdb-v2
- kind: Label
name: inputs-prometheus
- kind: Label
name: sensu-go-template
config: |
# Configuration for telegraf agent
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = false
# Configuration for sending metrics to InfluxDB
[[outputs.influxdb_v2]]
urls = ["$INFLUX_HOST"]
token = "$INFLUX_TOKEN"
organization = "$INFLUX_ORG"
bucket = "telegraf"
# Read metrics from one or many prometheus clients
[[inputs.prometheus]]
## An array of urls to scrape metrics from.
urls = ["http://localhost:8080/metrics"]
---
apiVersion: influxdata.com/v2alpha1
kind: Dashboard
metadata:
name: sensu-go
spec:
charts:
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: agent sessions
name: y
scale: linear
colors:
- hex: '#FDC44F'
name: Cthulhu
type: scale
- hex: '#007C76'
name: Cthulhu
type: scale
- hex: '#8983FF'
name: Cthulhu
type: scale
geom: monotoneX
height: 3
hoverDimension: auto
kind: Xy
name: Agent sessions per namespace
position: overlaid
queries:
- query: |-
from(bucket: v.bucket)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensu_go_agent_sessions")
|> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)
|> yield(name: "last")
shade: true
width: 5
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
name: y
scale: linear
colors:
- hex: '#DA6FF1'
name: Ectoplasm
type: scale
- hex: '#00717A'
name: Ectoplasm
type: scale
- hex: '#ACFF76'
name: Ectoplasm
type: scale
geom: line
height: 3
hoverDimension: auto
kind: Xy
name: Message publish latency distributions
position: overlaid
queries:
- query: |-
from(bucket: v.bucket)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensu_go_bus_message_duration")
|> filter(fn: (r) => r["_field"] == "0.5" or r["_field"] == "0.9" or r["_field"] == "0.99")
|> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
|> yield(name: "last")
shade: true
width: 6
xCol: _time
yCol: _value
yPos: 3
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
name: y
scale: linear
colors:
- hex: '#FD7A5D'
name: Delorean
type: scale
- hex: '#5F1CF2'
name: Delorean
type: scale
- hex: '#4CE09A'
name: Delorean
type: scale
geom: line
height: 3
hoverDimension: auto
kind: Xy
name: Event handler latency distribution
position: overlaid
queries:
- query: |-
from(bucket: v.bucket)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensu_go_event_handler_duration")
|> filter(fn: (r) => r["_field"] == "0.5" or r["_field"] == "0.9" or r["_field"] == "0.99")
|> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
|> yield(name: "last")
shade: true
width: 6
xCol: _time
yCol: _value
yPos: 6
- colors:
- hex: '#7CE490'
name: honeydew
type: text
decimalPlaces: 0
height: 1
kind: Single_Stat
name: Total etcd servers
queries:
- query: |-
from(bucket: "telegraf")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "etcd_server_id")
|> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: false)
|> yield(name: "sum")
width: 2
xPos: 5
- colors:
- hex: '#00C9FF'
name: laser
type: text
decimalPlaces: 0
height: 1
kind: Single_Stat
name: Total agent sessions
queries:
- query: |-
from(bucket: v.bucket)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensu_go_agent_sessions")
|> group()
|> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: true)
|> yield(name: "sum")
width: 2
xPos: 5
yPos: 1
- colors:
- hex: '#F48D38'
name: tiger
type: text
decimalPlaces: 0
height: 1
kind: Single_Stat
name: Total check schedulers
queries:
- query: |-
from(bucket: v.bucket)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensu_go_cron_schedulers" or r["_measurement"] == "sensu_go_interval_schedulers" or r["_measurement"] == "sensu_go_round_robin_cron_schedulers" or r["_measurement"] == "sensu_go_round_robin_interval_schedulers")
|> group()
|> aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: true)
|> yield(name: "sum")
width: 2
xPos: 5
yPos: 2
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: messages published
name: y
scale: linear
colors:
- hex: '#74D495'
name: Atlantis
type: scale
- hex: '#3F3FBA'
name: Atlantis
type: scale
- hex: '#FF4D9E'
name: Atlantis
type: scale
geom: line
height: 3
hoverDimension: auto
kind: Xy
name: Messages published per second
position: overlaid
queries:
- query: |-
from(bucket: v.bucket)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensu_go_bus_messages_published")
|> derivative(unit: 1s, nonNegative: true)
|> yield(name: "nonnegative derivative")
shade: true
width: 6
xCol: _time
xPos: 6
yCol: _value
yPos: 3
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: processed events
name: y
scale: linear
colors:
- hex: '#FD7A5D'
name: Delorean
type: scale
- hex: '#5F1CF2'
name: Delorean
type: scale
- hex: '#4CE09A'
name: Delorean
type: scale
geom: line
height: 3
hoverDimension: auto
kind: Xy
name: Processed events per second
position: overlaid
queries:
- query: |-
from(bucket: v.bucket)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensu_go_events_processed")
|> derivative(unit: 1s, nonNegative: true)
|> yield(name: "nonnegative derivative")
shade: true
width: 6
xCol: _time
xPos: 6
yCol: _value
yPos: 6
- axes:
- base: "10"
name: x
scale: linear
- base: "10"
label: check schedulers
name: y
scale: linear
colors:
- hex: '#FD7A5D'
name: Delorean
type: scale
- hex: '#5F1CF2'
name: Delorean
type: scale
- hex: '#4CE09A'
name: Delorean
type: scale
geom: monotoneX
height: 3
hoverDimension: auto
kind: Xy
name: Check schedulers per type
position: overlaid
queries:
- query: |-
from(bucket: v.bucket)
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "sensu_go_round_robin_interval_schedulers" or r["_measurement"] == "sensu_go_round_robin_cron_schedulers" or r["_measurement"] == "sensu_go_interval_schedulers" or r["_measurement"] == "sensu_go_cron_schedulers")
|> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: true)
|> yield(name: "last")
shade: true
width: 5
xCol: _time
xPos: 7
yCol: _value
description: Monitoring your Sensu Go observability tool with Telegraf and Prometheus
name: Sensu Go