-
-
Notifications
You must be signed in to change notification settings - Fork 71
/
dashboard.yaml
145 lines (137 loc) · 4.13 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
# yaml-language-server: $schema=https://raw.githubusercontent.com/K-Phoen/grabana/master/schemas/dashboard.json
title: Awesome dashboard
editable: true
shared_crosshair: true
tags: [generated, yaml]
auto_refresh: 10s
tags_annotations:
- name: Deployments
datasource: "-- Grafana --"
color: "#5794F2"
tags: ["deploy", "production"]
variables:
- interval:
name: interval
label: Interval
values: ["30s", "1m", "5m", "10m", "30m", "1h", "6h", "12h"]
default: 5m
- query:
name: status
label: HTTP status
datasource: Prometheus
request: "label_values(prometheus_http_requests_total, code)"
- const:
name: percentile
label: Percentile
default: 80
values_map:
50th: "50"
75th: "75"
80th: "80"
85th: "85"
90th: "90"
95th: "95"
99th: "99"
- custom:
name: vX
default: v2
values_map:
v1: v1
v2: v2
rows:
- name: Prometheus
panels:
- graph:
title: HTTP Rate
height: 400px
datasource: Prometheus
targets:
- prometheus:
query: "sum(rate(promhttp_metric_handler_requests_total[$interval])) by (code)"
legend: "{{ code }}"
axes:
left: { unit: short, min: 0, label: Requests }
alert:
summary: Too many successes
description: "Wow wow wow, why are you complaining?"
evaluate_every: 1m
for: 2m
on_no_data: alerting
on_execution_error: alerting
if:
- { avg: A, above: 0 }
targets:
- prometheus:
ref: A
query: "sum(rate(promhttp_metric_handler_requests_total{code=\"200\"}[5m])) by (code)"
legend: "{{ code }}"
lookback: 5m
- graph:
title: Heap allocations
height: 400px
datasource: Prometheus
targets:
- prometheus:
query: "go_memstats_heap_alloc_bytes"
legend: "{{job}}"
alert:
summary: Too many heap allocations
description: "Wow wow wow, a we're allocating a lot."
evaluate_every: 1m
for: 2m
on_no_data: alerting
on_execution_error: alerting
tags:
foo: bar
if:
- { avg: A, above: 23000000}
targets:
- prometheus:
ref: A
query: go_memstats_heap_alloc_bytes
legend: "{{ job }}"
- table:
title: Threads
datasource: Prometheus
targets:
- prometheus:
query: "go_threads"
hidden_columns: ["Time"]
time_series_aggregations:
- label: AVG
type: avg
- label: Current
type: current
- single_stat:
title: Heap Allocations
datasource: Prometheus
targets:
- prometheus:
query: 'go_memstats_heap_alloc_bytes{job="prometheus"}'
unit: bytes
thresholds: ["26000000", "28000000"]
color: ["value"]
- name: Stackdriver
panels:
- graph:
title: Pubsub Ack msg count
datasource: voi-stage-stackdriver
targets:
- stackdriver:
legend: Ack-ed messages
type: delta
metric: pubsub.googleapis.com/subscription/ack_message_count
aggregation: mean
alignment: {method: delta, period: stackdriver-auto}
filters:
eq:
resource.label.subscription_id: "awesome_subscription_id"
resource.type: pubsub_subscription
- name: "Some text, because it might be useful"
panels:
- text:
title: Some awesome text?
markdown: "Markdown syntax help: [commonmark.org/help](https://commonmark.org/help/)\n${percentile}"
- text:
title: Some awesome html?
html: "Some <b>awesome</b> html?"