Files
mtusi2026lab7/infra/otel/grafana/dashboards/messenger.json
T
koichakaev 65bbf3224a
Application HTTPS smoke / smoke (pull_request) Blocked by required conditions
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Выполнить лабораторную 7 по безопасности мессенджера
2026-12-04 23:51:24 +03:00

1523 lines
37 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"id": null,
"uid": "messenger-lab7",
"title": "ЛР6 · Наблюдаемость мессенджера",
"description": "HTTP, обработка вложений и SLO учебного стенда",
"tags": [
"mtusi",
"lab7"
],
"schemaVersion": 40,
"version": 2,
"timezone": "browser",
"time": {
"from": "now-15m",
"to": "now"
},
"refresh": "5s",
"panels": [
{
"id": 1,
"type": "row",
"title": "HTTP API",
"collapsed": false,
"gridPos": {
"x": 0,
"y": 0,
"w": 24,
"h": 1
},
"panels": []
},
{
"id": 2,
"type": "timeseries",
"title": "Запросы по статусам",
"description": "Запросы в секунду, сгруппированные по классу ответа. Health исключён.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 1,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (status_class) (rate(messenger_http_requests_total[30s]))",
"refId": "A",
"legendFormat": "{{status_class}}",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "reqps",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 3,
"type": "timeseries",
"title": "Ошибки API",
"description": "Доля 5xx на контрактных маршрутах за 30 с. Доля SLO использует тот же знаменатель.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 1,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum(rate(messenger_http_requests_total{route!=\"unmatched\",status_class=\"5xx\"}[30s])) / (sum(rate(messenger_http_requests_total{route!=\"unmatched\",status_class!=\"aborted\"}[30s])) > 0)",
"refId": "A",
"legendFormat": "HTTP 5xx",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 4,
"type": "timeseries",
"title": "Задержка API p50 / p95 / p99",
"description": "Гистограммы всех реплик суммируются по le перед histogram_quantile. Окно 1 минута.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 9,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "histogram_quantile(0.50, sum by (le) (rate(messenger_http_server_duration_seconds_bucket[1m])))",
"refId": "A",
"legendFormat": "p50",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_http_server_duration_seconds_bucket[1m])))",
"refId": "B",
"legendFormat": "p95",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "histogram_quantile(0.99, sum by (le) (rate(messenger_http_server_duration_seconds_bucket[1m])))",
"refId": "C",
"legendFormat": "p99",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "s",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 5,
"type": "timeseries",
"title": "RPS по маршрутам",
"description": "Только шаблоны маршрутов и HTTP-методы.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 9,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (route, method) (rate(messenger_http_requests_total[30s])) > 0",
"refId": "A",
"legendFormat": "{{method}} {{route}}",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "reqps",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 6,
"type": "row",
"title": "Обработка вложений",
"collapsed": false,
"gridPos": {
"x": 0,
"y": 17,
"w": 24,
"h": 1
},
"panels": []
},
{
"id": 7,
"type": "timeseries",
"title": "Исходы попыток",
"description": "ready, failed, retry_scheduled и исходы повторной доставки. Единица — попытки в секунду.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 18,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (outcome) (rate(messenger_jobs_total[30s]))",
"refId": "A",
"legendFormat": "{{outcome}}",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "ops",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 8,
"type": "timeseries",
"title": "Обработка worker p50 / p95 / p99",
"description": "Гистограмма длительности попытки. Время ожидания в очереди исключено.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 18,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "histogram_quantile(0.50, sum by (le) (rate(messenger_job_duration_seconds_bucket[1m])))",
"refId": "A",
"legendFormat": "p50",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_job_duration_seconds_bucket[1m])))",
"refId": "B",
"legendFormat": "p95",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "histogram_quantile(0.99, sum by (le) (rate(messenger_job_duration_seconds_bucket[1m])))",
"refId": "C",
"legendFormat": "p99",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "s",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 9,
"type": "timeseries",
"title": "Глубина очереди",
"description": "Устойчивые задания queued + processing по PostgreSQL. max исключает двойной счёт снимков API.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 26,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "max by (queue) (messenger_queue_depth)",
"refId": "A",
"legendFormat": "{{queue}}",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 10,
"type": "timeseries",
"title": "Возраст старейшей задачи",
"description": "Возраст от принятия до текущего момента. Пустая очередь даёт 0.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 26,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "max by (queue) (messenger_queue_oldest_seconds)",
"refId": "A",
"legendFormat": "{{queue}}",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "vector(10)",
"refId": "B",
"legendFormat": "Порог QueueLagHigh",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "s",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 11,
"type": "timeseries",
"title": "Время до первого ready p50 / p95 / p99",
"description": "Гистограмма фактически завершённых файлов. Просроченные незавершённые входят в burn rate SLO.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 34,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "histogram_quantile(0.50, sum by (le) (rate(messenger_attachment_ready_duration_seconds_bucket[1m])))",
"refId": "A",
"legendFormat": "p50",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_attachment_ready_duration_seconds_bucket[1m])))",
"refId": "B",
"legendFormat": "p95",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "histogram_quantile(0.99, sum by (le) (rate(messenger_attachment_ready_duration_seconds_bucket[1m])))",
"refId": "C",
"legendFormat": "p99",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "vector(10)",
"refId": "D",
"legendFormat": "Цель SLO",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "s",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 12,
"type": "timeseries",
"title": "Занятые слоты worker",
"description": "Мгновенные значения. Для коротких попыток часть занятых интервалов не видна из-за шага выборки.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 34,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum(messenger_worker_busy)",
"refId": "A",
"legendFormat": "Занятые",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum(messenger_worker_capacity)",
"refId": "B",
"legendFormat": "Доступные",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 28,
"type": "timeseries",
"title": "Загрузка worker",
"description": "Длительность занятости всех worker за 30 с делится на доступные слоты. Метрика учитывает короткие задания между scrape.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 42,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum(rate(messenger_worker_busy_time_seconds_total[30s])) / sum(messenger_worker_capacity)",
"refId": "A",
"legendFormat": "Доля занятого времени",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
},
"min": 0,
"max": 1
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 29,
"type": "timeseries",
"title": "Очереди экспортёров Collector",
"description": "Внутренние очереди Loki и Tempo. Каждая ограничена 32 пакетами.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 42,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "otelcol_exporter_queue_size",
"refId": "A",
"legendFormat": "{{exporter}}",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
},
"min": 0,
"max": 32
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 13,
"type": "row",
"title": "Зависимости и ресурсы",
"collapsed": false,
"gridPos": {
"x": 0,
"y": 50,
"w": 24,
"h": 1
},
"panels": []
},
{
"id": 14,
"type": "timeseries",
"title": "DB pool — занято / ждут",
"description": "Сумма по репликам. Занято — размер пула минус свободные соединения, включая открываемые соединения.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 51,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (service_name, pool) (messenger_db_pool_used)",
"refId": "A",
"legendFormat": "{{service_name}} / {{pool}} занято",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (service_name, pool) (messenger_db_pool_waiting)",
"refId": "B",
"legendFormat": "{{service_name}} / {{pool}} ждут",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 15,
"type": "timeseries",
"title": "Задержка PostgreSQL и S3 p95",
"description": "acquire показывает ожидание подключения, transaction — запросы и завершение транзакции.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 51,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "histogram_quantile(0.95, sum by (le, dependency, operation, outcome) (rate(messenger_dependency_duration_seconds_bucket[1m])))",
"refId": "A",
"legendFormat": "{{dependency}} / {{operation}} / {{outcome}}",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "s",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 16,
"type": "timeseries",
"title": "CPU приложения",
"description": "CPU-секунды процесса за секунду, сумма по репликам.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 59,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (service_name) (rate(messenger_process_cpu_seconds_total[30s]))",
"refId": "A",
"legendFormat": "{{service_name}}",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "cores",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 17,
"type": "timeseries",
"title": "RSS приложения",
"description": "Резидентная память процессов, сумма по репликам.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 59,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "sum by (service_name) (messenger_process_rss_bytes)",
"refId": "A",
"legendFormat": "{{service_name}}",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "bytes",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 18,
"type": "row",
"title": "Цели SLO и алерты",
"collapsed": false,
"gridPos": {
"x": 0,
"y": 67,
"w": 24,
"h": 1
},
"panels": []
},
{
"id": 19,
"type": "stat",
"title": "API SLI · 14 дней",
"description": "Доля ответов без 5xx. Цель 99%.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 68,
"w": 6,
"h": 5
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "1 - messenger:api:burn14d * 0.01",
"refId": "A",
"legendFormat": "SLI",
"instant": true,
"range": false
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"custom": {}
},
"overrides": []
},
"options": {
"colorMode": "value",
"graphMode": "none",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"values": false
}
}
},
{
"id": 20,
"type": "stat",
"title": "Ready ≤ 10 с · 14 дней",
"description": "Доля принятых файлов, впервые готовых в пределах 10 секунд. Цель 99%.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 6,
"y": 68,
"w": 6,
"h": 5
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "1 - messenger:ready:burn14d * 0.01",
"refId": "A",
"legendFormat": "SLI",
"instant": true,
"range": false
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"custom": {}
},
"overrides": []
},
"options": {
"colorMode": "value",
"graphMode": "none",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"values": false
}
}
},
{
"id": 21,
"type": "stat",
"title": "Бюджет ошибок API · 14 дней",
"description": "Доля использованного бюджета ошибок.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 68,
"w": 6,
"h": 5
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "messenger:api:burn14d",
"refId": "A",
"legendFormat": "Использовано",
"instant": true,
"range": false
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"custom": {}
},
"overrides": []
},
"options": {
"colorMode": "value",
"graphMode": "none",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"values": false
}
}
},
{
"id": 22,
"type": "stat",
"title": "Бюджет просрочек ready · 14 дней",
"description": "Доля использованного бюджета просрочек.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 18,
"y": 68,
"w": 6,
"h": 5
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "messenger:ready:burn14d",
"refId": "A",
"legendFormat": "Использовано",
"instant": true,
"range": false
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"custom": {}
},
"overrides": []
},
"options": {
"colorMode": "value",
"graphMode": "none",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"values": false
}
}
},
{
"id": 23,
"type": "timeseries",
"title": "Burn rate API",
"description": "1× означает расход бюджета с ожидаемой скоростью. Для алерта превышение нужно в обоих окнах.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 73,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "messenger:api:burn20s",
"refId": "A",
"legendFormat": "20s",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "messenger:api:burn1m",
"refId": "B",
"legendFormat": "1m",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "messenger:api:burn45s",
"refId": "C",
"legendFormat": "45s",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "messenger:api:burn3m",
"refId": "D",
"legendFormat": "3m",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "vector(15)",
"refId": "E",
"legendFormat": "Порог fast",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "vector(6)",
"refId": "F",
"legendFormat": "Порог slow",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 24,
"type": "timeseries",
"title": "Burn rate Ready",
"description": "1× означает расход бюджета с ожидаемой скоростью. Для алерта превышение нужно в обоих окнах.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 73,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "messenger:ready:burn20s",
"refId": "A",
"legendFormat": "20s",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "messenger:ready:burn1m",
"refId": "B",
"legendFormat": "1m",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "messenger:ready:burn45s",
"refId": "C",
"legendFormat": "45s",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "messenger:ready:burn3m",
"refId": "D",
"legendFormat": "3m",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "vector(15)",
"refId": "E",
"legendFormat": "Порог fast",
"instant": false,
"range": true
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "vector(6)",
"refId": "F",
"legendFormat": "Порог slow",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 25,
"type": "timeseries",
"title": "Срабатывания Prometheus",
"description": "Активные правила и история переходов. Список активных правил также есть на странице Prometheus /alerts.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 81,
"w": 24,
"h": 6
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"expr": "ALERTS{alertstate=\"firing\"}",
"refId": "A",
"legendFormat": "{{alertname}}",
"instant": false,
"range": true
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {
"lineWidth": 2,
"fillOpacity": 8
}
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "table",
"placement": "bottom",
"calcs": [
"lastNotNull"
]
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
}
},
{
"id": 26,
"type": "row",
"title": "События API и worker",
"collapsed": false,
"gridPos": {
"x": 0,
"y": 87,
"w": 24,
"h": 1
},
"panels": []
},
{
"id": 27,
"type": "logs",
"title": "Структурные журналы · переход Trace в деталях события",
"description": "Выберите строку и откройте Trace. В Loki можно фильтровать event, request_id или trace_id.",
"datasource": {
"type": "loki",
"uid": "loki"
},
"gridPos": {
"x": 0,
"y": 88,
"w": 24,
"h": 10
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "loki"
},
"expr": "{service_name=~\"messenger-api|messenger-worker\"}",
"refId": "A",
"queryType": "range"
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"custom": {}
},
"overrides": []
},
"options": {
"showTime": true,
"showLabels": false,
"showCommonLabels": false,
"sortOrder": "Descending",
"enableLogDetails": true
}
}
]
}