Escolar Documentos
Profissional Documentos
Cultura Documentos
2
Software is Hard!
3
Análise de Séries Temporais
4
Observability
Logs, Traces e Métricas
5
Sistemas em Produção
Sintomas Alertas
Doença Bug
Cirgurgia Fix
6
Caixas de métricas
7
Cloud
8
Logs
9
Traces
10
Métricas
• Aplicabilidade de métodos
estatísticos sobre os dados
11
Resumo
Métricas
Dados
Traces agregáveis
Dados de
Requests
Eventos agregáveis
Logs
Alto Eventos por request Eventos
Volume
Eventos agregáveis
de um request
12
Prometheus 101
Pacotão Básico
13
Intro
14
https://bit.ly/2GQtfCF
Demo Single Instance
/query_range /metrics
Grafana
15 IBM Confidential
Prometheus 102
16
PromQL Cheatsheet
Selectors Operators Functions
• Instant vector selectors: • Binary: • Operations on range vectors will always
return instant vectors
• In the simplest form, only the metric • + addition, - subtraction, * multiplication, /
name is needed: division, % modulo, ^ exponentiation • increase(v range-vector): calculates how
http_requests http_requests{status=”500”}/http_requests the counter increased over the range
specified. Use it with Counters only.
• One can filter the results by regexping • Comparison:
increase(http_requests{status=“500”}[1m])
over the dimensions:
• == equal, != not-equal, > greater-than, < less-
• rate(v range-vector): calculates the
http_requests{status=!”200”} than, >= greater-or-equal, <= less-or-equal
average per second rate of increase over
• Available matching operators: http_requests{status=”500”}/http_requests > 0.2 the range specified. Use it with Counters
=, !=, =~, !~ • Logical/set: only.
• Range vector selectors: rate(http_requests{status=“500”}[1m])
• Only between instant vectors
• Enable the selection of a range of • predict_linear(v range-vector, t scalar):
• and intersection, or union, unless complement
samples back from the current instant: predicts what the value of the current range
http_requests{status=”500”} or vector can be in t seconds with simple
http_requests{status=!”200”}[5m] http_requests{status=“400”}
linear regression. Use it with Gauges only.
• s seconds; m minutes; h hours; d days; • Aggregation: predict_linear(http_requests{status=“500”}[9m], 3600)
w weeks; y years
• Only application over a simple instant vector • deriv(v range-vector): calculates the per-
• [<time>] only applicable after a metric second derivative of the given range vector,
• sum, min, max, avg, stddev, stdvar, count,
selector using simple linear regression. Use it with
count_values, bottomk, topk, quantile
• Its also possible to offset the current time Gauges only.
• Can be aggregated over all dimensions or
of observations: deriv(http_requests{status=“500”}[9m])
preserve distinct dimensions by using without
http_requests{status=!”200”} offset 5m and by
17
sum(http_requests) by (status)
Demo Federation
18 https://bit.ly/2GQtfCF
Performance
19 IBM Confidential
Performance
20
Performance
CPU
1. Recording Rule and Alert Evaluation
2. Write ahead logs
3. Block compaction
Disco
21
https://goo.gl/DuUSvr
22