forked from mtusi2026/mtusi2026lab6
771 lines
16 KiB
JSON
771 lines
16 KiB
JSON
{
|
|
"uid": "messenger-lab6",
|
|
"title": "Messenger \u2014 lab6",
|
|
"schemaVersion": 39,
|
|
"version": 2,
|
|
"refresh": "5s",
|
|
"time": {
|
|
"from": "now-30m",
|
|
"to": "now"
|
|
},
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"title": "HTTP RPS",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 0,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum by (route) (rate(messenger_http_requests_total[1m]))",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "reqps"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"title": "HTTP 5xx ratio",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 0,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "messenger:api_error_ratio:1m",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percentunit"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 3,
|
|
"title": "HTTP p50/p95/p99",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 8,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "0.5",
|
|
"expr": "histogram_quantile(0.5,sum by (le)(rate(messenger_http_duration_seconds_bucket{route=~\"/api/v1/.*\"}[1m])))",
|
|
"legendFormat": "0.5"
|
|
},
|
|
{
|
|
"refId": "0.95",
|
|
"expr": "histogram_quantile(0.95,sum by (le)(rate(messenger_http_duration_seconds_bucket{route=~\"/api/v1/.*\"}[1m])))",
|
|
"legendFormat": "0.95"
|
|
},
|
|
{
|
|
"refId": "0.99",
|
|
"expr": "histogram_quantile(0.99,sum by (le)(rate(messenger_http_duration_seconds_bucket{route=~\"/api/v1/.*\"}[1m])))",
|
|
"legendFormat": "0.99"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
},
|
|
"description": "Business routes only; histogram quantiles across all API replicas. Bucket interpolation is approximate."
|
|
},
|
|
{
|
|
"id": 4,
|
|
"title": "Job outcomes",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 8,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum by (outcome) (rate(messenger_jobs_total[1m]))",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "ops"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 5,
|
|
"title": "Processing p95",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 16,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "histogram_quantile(0.95,sum by(le)(rate(messenger_job_duration_seconds_bucket[1m])))",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 6,
|
|
"title": "Time to ready p95",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 16,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "histogram_quantile(0.95,sum by(le)(rate(messenger_job_ready_duration_seconds_bucket[1m])))",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 7,
|
|
"title": "RabbitMQ ready messages",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 24,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "messenger_queue_depth",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 8,
|
|
"title": "Logical pending jobs / outbox",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 24,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "messenger_jobs_pending",
|
|
"legendFormat": "jobs"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"expr": "messenger_outbox_pending",
|
|
"legendFormat": "outbox"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 9,
|
|
"title": "Oldest unfinished job",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 32,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "messenger_queue_oldest_age_seconds",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 10,
|
|
"title": "DB connections used/capacity/waiting",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 32,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum by (service_name)(messenger_db_pool_used)",
|
|
"legendFormat": "used {{service_name}}"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"expr": "sum by (service_name)(messenger_db_pool_capacity)",
|
|
"legendFormat": "capacity {{service_name}}"
|
|
},
|
|
{
|
|
"refId": "C",
|
|
"expr": "sum by (service_name)(messenger_db_pool_waiting)",
|
|
"legendFormat": "waiting {{service_name}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 11,
|
|
"title": "Worker busy/capacity",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 40,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "messenger_worker_busy{service_name=\"messenger-worker\"}",
|
|
"legendFormat": "busy"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"expr": "messenger_worker_capacity{service_name=\"messenger-worker\"}",
|
|
"legendFormat": "capacity"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 12,
|
|
"title": "Process memory RSS",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 40,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "messenger_process_memory",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "bytes"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 13,
|
|
"title": "CPU by service (% of one core)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 48,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "100 * sum by(service_name)(rate(messenger_process_cpu[1m]))",
|
|
"legendFormat": "{{service_name}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percent"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 14,
|
|
"title": "API burn rate",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 48,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "messenger:api_error_ratio:1m / 0.01",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 15,
|
|
"title": "Ready burn rate",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 56,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "messenger:ready_error_ratio:1m / 0.01",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 16,
|
|
"title": "Alerts",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 56,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "ALERTS{alertstate=\"firing\"}",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 17,
|
|
"title": "Collector export failures",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 64,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "rate(otelcol_exporter_send_failed_spans_total[1m])",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "ops"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 18,
|
|
"title": "Observation freshness",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 64,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "time() - messenger_observation_timestamp",
|
|
"legendFormat": "{{service_name}} {{route}} {{outcome}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "list",
|
|
"placement": "bottom"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": 19,
|
|
"title": "API SLI \u2014 1 hour",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 72,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "1 - messenger:api_error_ratio:1h"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percentunit"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 20,
|
|
"title": "Ready SLI \u2014 1 hour",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 72,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "1 - messenger:ready_error_ratio:1h"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percentunit"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 21,
|
|
"title": "Exporter bounded queue",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 80,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "otelcol_exporter_queue_size",
|
|
"legendFormat": "size {{exporter}}"
|
|
},
|
|
{
|
|
"refId": "B",
|
|
"expr": "otelcol_exporter_queue_capacity",
|
|
"legendFormat": "capacity {{exporter}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 22,
|
|
"title": "DB lock waiters",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 80,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "messenger_db_locks_waiting"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
}
|
|
}
|
|
]
|
|
}
|