699 lines
16 KiB
JSON
699 lines
16 KiB
JSON
{
|
|
"id": null,
|
|
"uid": "messenger-lab6",
|
|
"title": "Messenger: API and image pipeline",
|
|
"schemaVersion": 39,
|
|
"version": 1,
|
|
"refresh": "5s",
|
|
"time": {
|
|
"from": "now-15m",
|
|
"to": "now"
|
|
},
|
|
"tags": [
|
|
"highload",
|
|
"lab6"
|
|
],
|
|
"panels": [
|
|
{
|
|
"id": 1,
|
|
"title": "API successful / error RPS (business only)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 0,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum by (status_class) (rate(http_server_requests_total{route!~\"/health.*\"}[30s]))",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "reqps"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"title": "API 5xx ratio",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 0,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "(sum(rate(http_server_requests_total{route!~\"/health.*\",status_class=\"5xx\"}[30s])) or vector(0)) / clamp_min(sum(rate(http_server_requests_total{route!~\"/health.*\"}[30s])),0.001)",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percentunit"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 3,
|
|
"title": "API p50 across replicas (histogram)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 8,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "histogram_quantile(0.5,sum by(le)(rate(http_server_duration_seconds_bucket{route!~\"/health.*\"}[60s])))",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 4,
|
|
"title": "API p95 across replicas (histogram)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 8,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "histogram_quantile(0.95,sum by(le)(rate(http_server_duration_seconds_bucket{route!~\"/health.*\"}[60s])))",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 5,
|
|
"title": "API p99 across replicas (histogram)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 16,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "histogram_quantile(0.99,sum by(le)(rate(http_server_duration_seconds_bucket{route!~\"/health.*\"}[60s])))",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 6,
|
|
"title": "Worker attempt outcomes / second",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 16,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum by(outcome)(rate(messenger_jobs_total[60s]))",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "ops"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 7,
|
|
"title": "Worker processing p95",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 24,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "histogram_quantile(.95,sum by(le)(rate(messenger_job_duration_seconds_bucket[60s])))",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 8,
|
|
"title": "Time to ready p95 (completed)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 24,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "histogram_quantile(.95,sum by(le)(rate(messenger_attachment_ready_duration_seconds_bucket[60s])))",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 9,
|
|
"title": "Outstanding jobs (DB authority, includes processing)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 32,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "max(messenger_queue_depth)",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 10,
|
|
"title": "Oldest unfinished age",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 32,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "max(messenger_queue_oldest_age_seconds)",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 11,
|
|
"title": "Worker saturation busy / capacity",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 40,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum(messenger_worker_busy)/clamp_min(sum(messenger_worker_capacity),1)",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percentunit"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 12,
|
|
"title": "DB acquired / max",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 40,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "messenger_db_pool_used / messenger_db_pool_limit",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percentunit"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 13,
|
|
"title": "DB pool empty acquire events / second",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 48,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "rate(messenger_db_pool_waits_total[60s])",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "ops"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 14,
|
|
"title": "Process RSS (parent, excludes transform child)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 48,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "process_memory_usage_bytes",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "bytes"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 15,
|
|
"title": "Process CPU cores (parent, excludes transform child)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 56,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "rate(process_cpu_time_seconds_total[60s])",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 16,
|
|
"title": "Ready SLI bad ratio 10m, includes unfinished >5s",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 56,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum(increase(messenger_attachment_sli_bad_total[10m])) / clamp_min(sum(increase(messenger_attachment_sli_total[10m])),1)",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percentunit"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 17,
|
|
"title": "Ingress API availability SLI 10m (includes LB 503)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 64,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "1-(sum(increase(haproxy_backend_http_responses_total{proxy=\"replicas\",code=\"5xx\"}[10m])) or vector(0))/clamp_min(sum(increase(haproxy_backend_http_responses_total{proxy=\"replicas\"}[10m])),1)",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "percentunit"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 18,
|
|
"title": "Collector dropped spans (counter)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 64,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "sum(otelcol_exporter_send_failed_spans_total)",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 19,
|
|
"title": "API structured logs",
|
|
"type": "logs",
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 72,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "{service_name=\"messenger-api\"}",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 20,
|
|
"title": "Worker structured logs",
|
|
"type": "logs",
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "loki"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 72,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "{service_name=\"messenger-worker\"}",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 21,
|
|
"title": "Firing alerts",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 80,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "ALERTS{alertstate=\"firing\"}",
|
|
"legendFormat": "{{service_name}} {{outcome}} {{quantile}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 22,
|
|
"title": "Container RAM including transform children",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 80,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "container_memory_usage_bytes",
|
|
"legendFormat": "{{service_name}} {{service_instance_id}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "bytes"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 23,
|
|
"title": "Container CPU cores including transform children",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 0,
|
|
"y": 88,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "rate(container_cpu_time_seconds_total[60s])",
|
|
"legendFormat": "{{service_name}} {{service_instance_id}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
}
|
|
},
|
|
{
|
|
"id": 24,
|
|
"title": "DB pending acquire calls (current)",
|
|
"type": "timeseries",
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "victoriametrics"
|
|
},
|
|
"gridPos": {
|
|
"x": 12,
|
|
"y": 88,
|
|
"w": 12,
|
|
"h": 8
|
|
},
|
|
"targets": [
|
|
{
|
|
"refId": "A",
|
|
"expr": "messenger_db_pool_waiting",
|
|
"legendFormat": "{{service_name}} {{service_instance_id}}"
|
|
}
|
|
],
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
}
|
|
}
|
|
],
|
|
"links": [
|
|
{
|
|
"title": "Tempo traces",
|
|
"type": "link",
|
|
"url": "/explore?left=%7B%22datasource%22:%22tempo%22%7D",
|
|
"targetBlank": true
|
|
}
|
|
]
|
|
}
|