-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
476 lines (474 loc) · 17.7 KB
/
index.html
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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
<!DOCTYPE html>
<html lang="en">
<head>
<title>Dive Into Graphite And Grafana</title>
<meta charset="utf-8">
<meta name="viewport" content="width=792, user-scalable=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="node_modules/shower-ribbon/styles/screen.css">
<link rel="stylesheet" href="styles/style.css">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-55877254-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body class="list">
<header class="caption">
<h1>Dive Into Graphite And Grafana</h1>
<p><a href="https://dentrifonov.github.io" title="Denis Trifonov Home Page">Denis Trifonov</a>, <a href="http://2gis.ru" title="2GIS City Map">2GIS</a></p>
</header>
<section class="slide cover" id="title"><div>
<h2>Dive Into Graphite<br>And Grafana</h2>
<p>Denis Trifonov</p>
<img src="pictures/2gis-cover.png" alt="2GIS Logo">
<style>
#title h2 {
position: relative;
top: 200px;
left: 40px;
}
#title p {
position: relative;
top: 200px;
left: 40px;
font-size: 32px;
}
</style>
</div></section>
<section class="slide"><div>
<h2>About me</h2>
<p>QA engineer at load testing team</p>
</div></section>
<section class="slide"><div>
<h2>About organization</h2>
<ul><a href="http://info.2gis.com/" title="2GIS Company Site">2GIS</a> is a free business listings with a city map:
<li>The most detailed maps</li>
<li>Contact details of all organizations</li>
<li>Public transport routes</li>
</ul>
</div></section>
<section class="slide"><div>
<h2>Services</h2>
<ul>
<li>WebAPI</li>
<li>Photo</li>
<li>Authentication</li>
<li>Push2Dial</li>
<li>Personal account</li>
<li>Others</li>
</ul>
</div></section>
<section class="slide"><div>
<h2>Load Testing</h2>
<p>Previously we generated load by Yandex.Tank. Also we used it's console output and built-in reports for analysis.</p>
</div></section>
<section class="slide"><div>
<h2>Problems</h2>
<ul>
<li>No common storage metrics</li>
<li>No build management</li>
<li>No customizing reports</li>
<li>No instruments for working with reports</li>
<li>Difficult automation</li>
<li>Difficult integration</li>
</ul>
</div></section>
<section class="slide"><div>
<h2>Effects</h2>
<ul>
<li>Manual load testing</li>
<li>Manual organizing results and reports</li>
<li>Reports as is</li>
<li>Difficult programming scripts</li>
</ul>
</div></section>
<section class="slide shout" id="objective"><div>
<h2>“We need tools for organizing<br>load testing, automation and<br>integration with CI/CD”</h2>
<style>
#objective div {
background-color: #00b2dd;
}
#objective h2 {
font-size: 300%;
color: #fff;
}
</style>
</div></section>
<section class="slide shout" id="graphite"><div>
<h2>Graphite</h2>
<style>
#graphite div {
background-color: #a6ce38;
}
</style>
</div></section>
<section class="slide"><div>
<h2>Yandex.Tank and Graphite</h2>
<p>Graphite — enterprise-scale monitoring tool for metrics store and graphs rendering. Yandex.Tank has a built-in Graphite support.</p>
</div></section>
<section class="slide"><div>
<h2>Graphite Components</h2>
<ul>
<li>The Carbon metric processing daemons</li>
<li>The Whisper/Ceres time-series database library</li>
<li>Graphite-Web, a Django-based web application that renders graphs and dashboards</li>
</ul>
</div></section>
<section class="slide"><div>
<h2>Carbon</h2>
<p>Carbon is receiving metrics over the network, caching them in memory for “hot queries” from the Graphite-Web application, and persisting them to disk using the Whisper or Ceres time-series library</p>
</div></section>
<section class="slide"><div>
<h2>Carbon Pipeline</h2>
<ul>Pipeline defines what the carbon daemon do with metric data they receive or generate. In general there are two typical behaviours: redirect data to other Carbon daemon or write data on disk. There are a few optional processing features:
<li>Aggregate</li>
<li>Filter</li>
<li>Rewrite</li>
<li><strong>Relay/Write</strong></li>
</ul>
</div></section>
<section class="slide"><div>
<h2>Whisper</h2>
<p>Whisper is a fixed-size database, similar in design and purpose to RRD (round-robin-database). It provides fast, reliable storage of numeric data over time. Whisper allows for higher resolution (seconds per point) of recent data to degrade into lower resolutions for long-term retention of historical data.</p>
</div></section>
<section class="slide"><div>
<h2>Whisper</h2>
<ul>Pros:
<li>Fixed-size database (reserved space)</li>
</ul>
<ul>Cons:
<li>Fixed-size database (overhead space in some situations)</li>
<li>Intensive creating new metrics</li>
</ul>
</div></section>
<section class="slide"><div>
<h2>Ceres</h2>
<p>Ceres is a time-series database format intended to replace Whisper as the default storage format for Graphite. In contrast with Whisper, Ceres is not a fixed-size database and is designed to better support sparse data of arbitrary fixed-size resolutions. This allows Graphite to distribute individual time-series across multiple servers or mounts.</p>
<p>Supports in <code>megacarbon</code> Carbon git branch.</p>
</div></section>
<section class="slide"><div>
<h2>Ceres</h2>
<ul>Pros:
<li>Fast creating new metrics</li>
<li>Distributed storage</li>
</ul>
<ul>Cons:
<li>Not released, but works fine</li>
<li>Features such as roll-up aggregation are not provided by Ceres itself, but instead are implemented as maintenance plugins in Carbon</li>
</ul>
</div></section>
<section class="slide"><div>
<h2>Graphite-Web</h2>
<p> A Django webapp that renders graphs on-demand using Cairo. As you send datapoints to Carbon, they become immediately available for graphing in the webapp. The webapp offers several ways to create and display graphs including a simple URL API for rendering that makes it easy to embed graphs in other webpages.</p>
</div></section>
<section class="slide cover" id="graphite-components"><div>
<img src="pictures/graphite.png" alt="Graphite components">
<p class="note">Image from <a href="https://github.com/graphite-project/graphite-web/blob/77889afaa9adca7d77dc90ab64af3810374498cd/README.md">github.com/graphite-project/graphite-web/blob/77889afaa9adca7d77dc90ab64af3810374498cd/README.md</a></p>
<style>
#graphite-components p {
font-size: 50%;
position: absolute;
top: 600px;
}
</style>
</div></section>
<section class="slide"><div>
<h2>Setup</h2>
<ul>
<li>Official documentation <a href="http://graphite.readthedocs.org/en/latest/index.html" title="Graphite Documentation">graphite.readthedocs.org/en/latest/index.html</a></li>
<li>Carbon Ansible role <a href="https://gitlab.2gis.local/ansible/carbon/" title="Carbon Ansible Role">gitlab.2gis.local/ansible/carbon</a></li>
<li>Ceres Ansible role <a href="https://gitlab.2gis.local/ansible/ceres/" title="Ceres Ansible Role">gitlab.2gis.local/ansible/ceres</a></li>
<li>Graphite-Web Ansible role <a href="https://gitlab.2gis.local/ansible/graphite-web/" title="Graphite-Web Ansible Role">gitlab.2gis.local/ansible/graphite-web</a></li>
</ul>
<p class="note">Ansible roles will be in public (on GitHub) later.</p>
</div></section>
<section class="slide"><div>
<h2>Default Configuration</h2>
<pre><code><mark class="comment"># daemon.conf</mark>
PIPELINE = write
<mark class="comment"># db.conf</mark>
DATABASE = ceres
LOCAL_DATA_DIR = /opt/graphite/storage/ceres/</code></pre>
</div></section>
<section class="slide"><div>
<h2>Default Configuration</h2>
<pre><code><mark class="comment"># listeners.conf</mark>
[plaintext-receiver]
port = 2003
type = plaintext-receiver
[pickle-receiver]
port = 2004
type = pickle-receiver</code></pre>
</div></section>
<section class="slide"><div>
<h2>Default Configuration</h2>
<pre><code><mark class="comment"># storage-rules.conf</mark>
[defaults]
match-all = true
retention = 1m:30d
aggregation-method = average</code></pre>
</div></section>
<section class="slide"><div>
<h2>Default Configuration</h2>
<pre><code><mark class="comment"># writer.conf</mark>
CACHE_QUERY_PORT = 7002
<mark class="comment"># When using Ceres you should set this to a much higher
# value like 1000, if using Whisper - set this value low
# (like at 50)</mark>
MAX_CREATES_PER_MINUTE = 1000</code></pre>
</div></section>
<section class="slide"><div>
<h2>Default Configuration</h2>
<pre><code><mark class="comment"># local_settings.py</mark>
STORAGE_FINDERS = ('graphite.finders.ceres.CeresFinder',)
<mark class="comment"># CLUSTER_SERVERS = []</mark>
CARBONLINK_HOSTS = ['127.0.0.1:7002:cache0']
</code></pre>
</div></section>
<section class="slide"><div>
<h2>Using (Live Demo)</h2>
<ul>
<li>Graphs and dashboards</li>
<li>Functions for transform, combine, and perform computations on series data</li>
<li>API for rendering graphs and getting metrics in different formats</li>
</ul>
</div></section>
<section class="slide"><div>
<h2>Scaling</h2>
<p>You may add more Carbon cache daemons for full utilization of CPU resources and disk IO on same node, add new Graphite nodes to cluster and top-level Carbon relay daemons (or aggregation layer), setup replication and other. It's up on you.</p>
</div></section>
<section class="slide cover" id="graphite-cluster-2"><div>
<img src="pictures/graphite-cluster-2.jpg" alt="Graphite cluster with two nodes">
<p class="note">Image from <a href="http://www.slideshare.net/AnatolijDobrosynets/graphite-cluster-setup-blueprint">www.slideshare.net/AnatolijDobrosynets/graphite-cluster-setup-blueprint</a></p>
<style>
#graphite-cluster-2 p {
font-size: 50%;
position: absolute;
top: 600px;
}
</style>
</div></section>
<section class="slide cover" id="graphite-cluster-3"><div>
<img src="pictures/graphite-cluster-3.jpg" alt="Graphite cluster with three nodes">
<p class="note">Image from <a href="http://www.slideshare.net/AnatolijDobrosynets/graphite-cluster-setup-blueprint">www.slideshare.net/AnatolijDobrosynets/graphite-cluster-setup-blueprint</a></p>
<style>
#graphite-cluster-3 p {
font-size: 50%;
position: absolute;
top: 600px;
}
</style>
</div></section>
<section class="slide cover" id="graphite-cluster"><div>
<img src="pictures/graphite-cluster.png" alt="Graphite cluster with three nodes and aggregation layer">
<p class="note">Image from <a href="http://www.ericholzbach.net/blog/creating-a-scalable-graphite-cluster.html">www.ericholzbach.net/blog/creating-a-scalable-graphite-cluster.html</a></p>
<style>
#graphite-cluster p {
font-size: 50%;
position: absolute;
top: 600px;
}
</style>
</div></section>
<section class="slide"><div>
<h2>Summary</h2>
<ul>
<li>Try Graphite if you need tool for store billions metrics and getting them from UI or API</li>
<li>Graphite is easy to scale</li>
<li>Plenty of tools work with Graphite <a href="http://graphite.readthedocs.org/en/latest/tools.html" title="Tools That Work With Graphite">graphite.readthedocs.org/en/latest/tools.html</a></li>
</ul>
</div></section>
<section class="slide shout" id="grafana"><div>
<h2>Grafana</h2>
<style>
#grafana div {
background-color: #f9ec00;
}
</style>
</div></section>
<section class="slide"><div>
<h2>Graphite-Web UI Alternatives</h2>
<ul>
<li><strong>Grafana</strong></li>
<li>Giraffe</li>
<li>Graphene</li>
<li>Graph Explorer</li>
<li>Tessera</li>
</ul>
<p class="note">See all on <a href="http://graphite.readthedocs.org/en/latest/tools.html#visualization" title="Graphite-Web UI Alternatives">graphite.readthedocs.org/en/latest/tools.html#visualization</a></p>
</div></section>
<section class="slide"><div>
<h2>Grafana</h2>
<p>An open source, feature rich metrics dashboard and graph editor for Graphite, InfluxDB & OpenTSDB</p>
</div></section>
<section class="slide"><div>
<h2>Feature Highlights</h2>
<ul>
<li>Rich graphing</li>
<li>Dashboards</li>
<li>Templated and scripted dashboards</li>
<li>Graphite/InfluxDB query editor</li>
<li>Templated queries</li>
<li>Annotations</li>
</ul>
</div></section>
<section class="slide"><div>
<h2>Rich Graphing</h2>
<ul>
<li>Click and select region to zoom</li>
<li>Multiple Y-Axes</li>
<li>Bars, Lines, Points</li>
<li>Grid thresholds</li>
<li>Y-axis formats (bytes, milliseconds, etc)</li>
<li>Stacked lines</li>
</ul>
<p class="note">Live demo <a href="http://play.grafana.org/#/dashboard/db/graph-styles" title="Rich Graphing Live Demo">play.grafana.org/#/dashboard/db/graph-styles</a></p>
</div></section>
<section class="slide"><div>
<h2>Dashboards</h2>
<ul>
<li>Instant dashboard search based on title or tags</li>
<li>Templated dashboards</li>
<li>Scripted dashboards</li>
<li>Dashboard playlist</li>
<li>Save/Load from Elasticsearch</li>
<li>Save/Load from JSON file</li>
</ul>
<p class="note">Live demo <a href="http://play.grafana.org/#/dashboard/db/templated-graphs-nested" title="Dashboards Live Demo">play.grafana.org/#/dashboard/db/templated-graphs-nested</a></p>
</div></section>
<section class="slide"><div>
<h2>Scripted Dashboards</h2>
<pre><code>dashboard.rows.push({
panels: [{
targets: [{
'target': 'test.app.some.metrics'
}]
}]
});</code></pre>
<p>URL: <a href="#" title="Sample URL">http://grafana_url/#/dashboard/script/scripted.js?foo=bar</a></p>
</div></section>
<section class="slide"><div>
<h2>Graphite Query Editor</h2>
<ul>
<li>Click on any metric segment to change it</li>
<li>Quickly add functions (search, typeahead)</li>
<li>Click on a function parameter to change it</li>
<li>Move function order to the left or right</li>
<li>Direct link to Graphite function documentation</li>
</ul>
<p class="note">Live demo <a href="http://play.grafana.org/#/dashboard/db/graphite-carbon-metrics" title="Graphite Query Editor Live Demo">play.grafana.org/#/dashboard/db/graphite-carbon-metrics</a></p>
</div></section>
<section class="slide"><div>
<h2>Annotations</h2>
<ul>
<li>Fetch annotations from Elasticsearch</li>
<li>Fetch annotations from Graphite events and metrics</li>
<li>Fetch annotations from InfluxDB</li>
</ul>
<p class="note">Live demo <a href="http://play.grafana.org/#/dashboard/db/annotations" title="Annotations Live Demo">play.grafana.org/#/dashboard/db/annotations</a></p>
</div></section>
<section class="slide"><div>
<h2>Summary</h2>
<ul>
<li>Try Grafana if you need more features to manipulate with graphs and dashboards</li>
<li>Use templated and scripted dashboards for building dynamic dashboards and reports</li>
<li>Use Grafana if you like Kibana :)</li>
<li>Grafana 2.0 and the future <a href="http://grafana.org/blog/2015/01/12/grafana2-the-future-and-raintank.html" title="Grafana 2.0 and the Future">grafana.org/blog/2015/01/12/grafana2-the-future-and-raintank.html</a></li>
</ul>
</div></section>
<section class="slide shout" id="graphitafana"><div>
<h2>Graphite + Grafana<br>=<br>Graphitafana</h2>
<style>
#graphitafana div {
background-color: #e77c4f;
}
#graphitafana h2 {
color: #fff;
font-size: 100px;
}
</style>
</div></section>
<section class="slide"><div>
<h2>Links</h2>
<ul>
<li>Yandex.Tank <a href="https://tech.yandex.ru/tank/" title="Yandex.Tank Site">tech.yandex.ru/tank/</a></li>
<li>Graphite <a href="http://graphite.readthedocs.org/en/latest/" title="Graphite Site">graphite.readthedocs.org/en/latest/</a></li>
<li>Grafana <a href="http://grafana.org/" title="Grafana Site">grafana.org</a></li>
</ul>
</div></section>
<section class="slide cover" id="contacts"><div>
<h2>Denis Trifonov</h2>
<p>
<a href="https://dentrifonov.github.io" title="Denis Trifonov Home Page">dentrifonov.github.io</a>
</p>
<div><span></span><h2>Thanks!</h2></div>
<img src="pictures/2gis-cover.png" alt="2GIS Logo">
<style>
#contacts h2 {
position: relative;
top: 200px;
left: 40px;
}
#contacts p {
position: relative;
top: 200px;
left: 40px;
font-size: 32px;
}
#contacts div div {
width: 250px;
height: 250px;
position: relative;
top: -120px;
left: 550px;
background: #00b2dd;
border-radius: 50%;
white-space: nowrap;
text-align: center;
vertical-align: middle;
}
#contacts div div span {
display: inline-block;
height: 100%;
vertical-align: middle;
}
#contacts div div h2 {
z-index: auto;
vertical-align: middle;
position: static;
display: inline-block;
margin-bottom: 0;
color: #fff;
}
</style>
</div></section>
<div class="progress"><div></div></div>
<script src="node_modules/shower-core/shower.min.js"></script>
<script type="text/javascript">
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter26725989 = new Ya.Metrika({
id:26725989
});
} catch(e) { }
});
var n = d.getElementsByTagName("script")[0],
s = d.createElement("script"),
f = function () { n.parentNode.insertBefore(s, n); };
s.type = "text/javascript";
s.async = true;
s.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//mc.yandex.ru/metrika/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="//mc.yandex.ru/watch/26725989" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
</body>
</html>