Выполнение лабораторной работы номер 7
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"uid":"messenger", "title":"Messenger — Lab 6", "schemaVersion":39, "version":1,
|
||||
"refresh":"5s", "time":{"from":"now-15m","to":"now"},
|
||||
"panels":[
|
||||
{"id":1,"title":"HTTP successful RPS","type":"timeseries","gridPos":{"x":0,"y":0,"w":12,"h":8},"datasource":{"uid":"prometheus"},"targets":[{"expr":"sum(rate(messenger_http_requests_total{status_class=\"2xx\",route!~\"/health/.*\"}[1m]))","legendFormat":"RPS"}]},
|
||||
{"id":2,"title":"HTTP 5xx ratio","type":"timeseries","gridPos":{"x":12,"y":0,"w":12,"h":8},"datasource":{"uid":"prometheus"},"targets":[{"expr":"sum(rate(messenger_http_requests_total{status_class=\"5xx\",route!~\"/health/.*\"}[1m])) / clamp_min(sum(rate(messenger_http_requests_total{route!~\"/health/.*\"}[1m])),0.001)","legendFormat":"error ratio"}]},
|
||||
{"id":3,"title":"HTTP latency seconds p50/p95/p99","type":"timeseries","gridPos":{"x":0,"y":8,"w":12,"h":8},"datasource":{"uid":"prometheus"},"targets":[{"expr":"histogram_quantile(0.5,sum by(le)(rate(messenger_http_duration_seconds_bucket[1m])))","legendFormat":"p50"},{"expr":"histogram_quantile(0.95,sum by(le)(rate(messenger_http_duration_seconds_bucket[1m])))","legendFormat":"p95"},{"expr":"histogram_quantile(0.99,sum by(le)(rate(messenger_http_duration_seconds_bucket[1m])))","legendFormat":"p99"}]},
|
||||
{"id":4,"title":"Jobs per second by outcome","type":"timeseries","gridPos":{"x":12,"y":8,"w":12,"h":8},"datasource":{"uid":"prometheus"},"targets":[{"expr":"sum by(outcome)(rate(messenger_job_processed_total[1m]))","legendFormat":"{{outcome}}"}]},
|
||||
{"id":5,"title":"Queue depth / oldest seconds","type":"timeseries","gridPos":{"x":0,"y":16,"w":12,"h":8},"datasource":{"uid":"prometheus"},"targets":[{"expr":"max(messenger_queue_depth{service_name=\"messenger-dispatcher\"})","legendFormat":"depth"},{"expr":"max(messenger_queue_oldest_seconds{service_name=\"messenger-dispatcher\"})","legendFormat":"oldest seconds"}]},
|
||||
{"id":6,"title":"Worker duration / ready p95 seconds","type":"timeseries","gridPos":{"x":12,"y":16,"w":12,"h":8},"datasource":{"uid":"prometheus"},"targets":[{"expr":"histogram_quantile(0.95,sum by(le)(rate(messenger_job_duration_seconds_bucket[1m])))","legendFormat":"worker"},{"expr":"histogram_quantile(0.95,sum by(le)(rate(messenger_ready_duration_seconds_bucket[1m])))","legendFormat":"end-to-end"}]},
|
||||
{"id":7,"title":"DB pool used / waiting","type":"timeseries","gridPos":{"x":0,"y":24,"w":12,"h":8},"datasource":{"uid":"prometheus"},"targets":[{"expr":"sum by(service_name)(messenger_db_pool_used)","legendFormat":"used {{service_name}}"},{"expr":"sum by(service_name)(messenger_db_pool_waiting)","legendFormat":"waiting {{service_name}}"}]},
|
||||
{"id":8,"title":"Worker saturation","type":"timeseries","gridPos":{"x":12,"y":24,"w":12,"h":8},"datasource":{"uid":"prometheus"},"targets":[{"expr":"sum(messenger_worker_busy) / clamp_min(sum(messenger_worker_capacity),1)","legendFormat":"busy ratio"}]},
|
||||
{"id":9,"title":"Process CPU seconds per second","type":"timeseries","gridPos":{"x":0,"y":32,"w":12,"h":8},"datasource":{"uid":"prometheus"},"targets":[{"expr":"sum by(service_name)(rate(messenger_process_cpu_seconds_total[1m]))","legendFormat":"{{service_name}}"}]},
|
||||
{"id":10,"title":"Peak process memory bytes","type":"timeseries","gridPos":{"x":12,"y":32,"w":12,"h":8},"datasource":{"uid":"prometheus"},"targets":[{"expr":"max by(service_name)(messenger_process_peak_memory_bytes)","legendFormat":"{{service_name}}"}]}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: 1
|
||||
providers:
|
||||
- name: Messenger
|
||||
type: file
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
uid: prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://prometheus:9090
|
||||
isDefault: true
|
||||
- name: Loki
|
||||
uid: loki
|
||||
type: loki
|
||||
access: proxy
|
||||
url: http://loki:3100
|
||||
- name: Tempo
|
||||
uid: tempo
|
||||
type: tempo
|
||||
access: proxy
|
||||
url: http://tempo:3200
|
||||
Reference in New Issue
Block a user