forked from jakubplichta/grafana-dashboard-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.yaml
210 lines (196 loc) · 4.97 KB
/
project.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
---
- name: Example project
project:
dashboard-prefix: MyApp
metric-prefix: metric.prefix
component:
- frontend
- backend
env:
- testing:
nodes: [node1, node2]
- production:
nodes: node3
dashboards:
- overview
- '{component}-connections'
- '{component}-{env}-{nodes}-system-details'
- 'some dashboard'
- default-dashboard: &default-dashboard
time_options: [1h, 6h, 12h, 24h, 2d, 7d, 14d, 30d]
refresh_intervals: [5m, 15m, 30m, 1h]
time:
from: now-2d
to: now
- name: overview
dashboard:
title: '{dashboard-prefix} Overview'
tags:
- tag1
- tag2
<<: *default-dashboard
rows:
- row:
title: '{dashboard-prefix}-row'
panels:
- graph:
span: 3
title: Frontend
target: 'aliasByMetric({metric-prefix}.frontend.*)'
- graph:
span: 3
title: Backend
target: 'aliasByMetric({metric-prefix}.backend.*)'
- name: '{component}-connections'
dashboard:
title: '{dashboard-prefix} {component} connections'
time_options: [1h]
refresh_intervals: [5m]
templates:
- query:
query: '{metric-prefix}.{component}.$application'
time:
from: now-12h
to: now
rows:
- row:
title: '{dashboard-prefix}-row'
panels:
- graph:
span: 3
title: Connections
target: 'aliasByMetric({metric-prefix}.{component}.$application.*)'
- name: '{component}-{env}-{nodes}-system-details'
dashboard:
title: '{dashboard-prefix} System Details of {component} {env} {nodes}'
time_options: [1h]
refresh_intervals: [5m]
templates:
- template:
metric-prefix: '{metric-prefix}'
component: '{component}'
time:
from: now-12h
to: now
rows:
- first-row:
component: '{component}'
env: '{env}'
nodes: '{nodes}'
metric-prefix: '{metric-prefix}'
- name: first-row
rows:
- row:
title: '{component} {env} {nodes}'
panels:
- connections:
metric-prefix: '{metric-prefix}'
component: '{component}'
- memory:
metric-prefix: '{metric-prefix}'
component: '{component}'
- text:
span: 3
title: text title
mode: text
content: example text
- second-row
- '{param}-row':
param:
- value1
- value2
- name: second-row
rows:
- row:
title: Placeholder row
height: 100px
showTitle: true
- name: '{param}-row'
rows:
- row:
title: '{param} row'
- name: connections
panels:
- graph:
target: 'aliasByMetric({metric-prefix}.{component}.$application.connections.*)'
span: 3
grid:
leftMax: 100
rightMax: 10
leftMin: 0
rightMin: -10
- name: memory
panels:
- graph:
targets:
- 'aliasByMetric({metric-prefix}.{component}.$application.load.*)'
- 'aliasByMetric({metric-prefix}.{component}.$application.unload.*)'
y_formats: [bytes, short]
span: 4
links:
- dashboard-link:
title: link title
dashboard: overview
params:
- application
- param-with-value: param-value
- absolute-link:
title: link title
url: https://github.com
- name: template
templates:
- query:
query: '{metric-prefix}.{component}.$application'
application:
metric: '*core*'
current: first
options:
- first
- last
- name: 'some dashboard'
dashboard:
title: some dashboard
templates:
- another-template:
choices:
- x
- y
rows:
- row:
title: 'App'
height: '250px'
editable: true
collapse: true
panels:
- singlestat-{title}:
title:
- overview:
dashboard: 'Overview'
- resources:
dashboard: 'resources'
params:
- cluster: eu
- node: 'www01'
- name: 'another-template'
templates:
- custom-template:
name: 'choice'
options: '{choices}'
- name: 'singlestat-{title}'
panels:
- single-stat:
title: '{title}'
error: false
span: 4
sparkline:
show: false
full: false
lineColor: "rgb(31, 120, 193)"
fillColor: "rgba(31, 118, 189, 0.18)"
valueMaps:
'null': '{title}'
links:
- dashboard-link:
title: '{title}'
dashboard: '{dashboard}'
params: '{params}'