forked from mtusi2026/mtusi2026lab6
chore: import lab5 baseline
This commit is contained in:
@@ -0,0 +1,918 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": []
|
||||
},
|
||||
"editable": false,
|
||||
"graphTooltip": 1,
|
||||
"panels": [
|
||||
{
|
||||
"type": "row",
|
||||
"title": "API and edge",
|
||||
"id": 100,
|
||||
"collapsed": true,
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "API requests by route",
|
||||
"id": 1,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 1
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum by (method, route) (rate(messenger_http_requests_total[1m]))",
|
||||
"legendFormat": "{{method}} {{route}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "reqps"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "API responses by status class",
|
||||
"id": 2,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 1
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum by (status_class) (rate(messenger_http_requests_total[1m]))",
|
||||
"legendFormat": "{{status_class}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "reqps"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "API latency p95 by route",
|
||||
"id": 3,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "histogram_quantile(0.95, sum by (le, method, route) (rate(messenger_http_request_duration_seconds_bucket[5m])))",
|
||||
"legendFormat": "{{method}} {{route}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "API replicas and requests in flight",
|
||||
"id": 4,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 9
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(up{job=\"messenger\"})",
|
||||
"legendFormat": "healthy replicas",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(messenger_http_requests_in_flight)",
|
||||
"legendFormat": "in flight",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "API CPU usage",
|
||||
"id": 5,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 17
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(process_cpu_seconds_total{job=\"messenger\"}[1m]))",
|
||||
"legendFormat": "API",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "cores"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Nginx requests and connections",
|
||||
"id": 6,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 17
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(nginx_http_requests_total[1m]))",
|
||||
"legendFormat": "requests/s",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(nginx_connections_active)",
|
||||
"legendFormat": "active connections",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "row",
|
||||
"title": "PostgreSQL",
|
||||
"id": 101,
|
||||
"collapsed": true,
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 25
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "PostgreSQL availability and connections",
|
||||
"id": 7,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 26
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "up{job=\"postgres\"}",
|
||||
"legendFormat": "up",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(pg_stat_activity_count{datname=\"messenger\"})",
|
||||
"legendFormat": "connections",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "PostgreSQL transactions",
|
||||
"id": 8,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 26
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(pg_stat_database_xact_commit{datname=\"messenger\"}[1m]))",
|
||||
"legendFormat": "commit/s",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(rate(pg_stat_database_xact_rollback{datname=\"messenger\"}[1m]))",
|
||||
"legendFormat": "rollback/s",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "PostgreSQL database size",
|
||||
"id": 9,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 34
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "pg_database_size_bytes{datname=\"messenger\"}",
|
||||
"legendFormat": "messenger",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bytes"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Attachment jobs by status",
|
||||
"id": 10,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 34
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "messenger_attachment_jobs_count",
|
||||
"legendFormat": "{{status}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Oldest attachment job",
|
||||
"id": 11,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 42
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "messenger_attachment_jobs_oldest_age_seconds",
|
||||
"legendFormat": "{{status}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Pending outbox",
|
||||
"id": 12,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 42
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "messenger_outbox_pending",
|
||||
"legendFormat": "events",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "messenger_outbox_oldest_pending_age_seconds",
|
||||
"legendFormat": "oldest age, seconds",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byFrameRefID",
|
||||
"options": "B"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "unit",
|
||||
"value": "s"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "row",
|
||||
"title": "Valkey and Redis",
|
||||
"id": 102,
|
||||
"collapsed": true,
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 50
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Valkey and Redis availability",
|
||||
"id": 13,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 51
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "up{job=\"valkey\"}",
|
||||
"legendFormat": "Valkey",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "up{job=\"redis-broker\"}",
|
||||
"legendFormat": "Redis broker",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Valkey and Redis memory",
|
||||
"id": 14,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 51
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "redis_memory_used_bytes{job=\"valkey\"}",
|
||||
"legendFormat": "Valkey",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "redis_memory_used_bytes{job=\"redis-broker\"}",
|
||||
"legendFormat": "Redis broker",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bytes"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Valkey cache hits and misses",
|
||||
"id": 15,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 59
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(redis_keyspace_hits_total{job=\"valkey\"}[1m]))",
|
||||
"legendFormat": "hits/s",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(rate(redis_keyspace_misses_total{job=\"valkey\"}[1m]))",
|
||||
"legendFormat": "misses/s",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Valkey and Redis commands",
|
||||
"id": 16,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 59
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(redis_commands_processed_total{job=\"valkey\"}[1m]))",
|
||||
"legendFormat": "Valkey commands/s",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(rate(redis_commands_processed_total{job=\"redis-broker\"}[1m]))",
|
||||
"legendFormat": "Redis commands/s",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "row",
|
||||
"title": "Object storage",
|
||||
"id": 103,
|
||||
"collapsed": true,
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 67
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "MinIO availability",
|
||||
"id": 17,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 68
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "up{job=\"minio\"}",
|
||||
"legendFormat": "up",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "MinIO objects and requests",
|
||||
"id": 18,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 68
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(minio_cluster_usage_object_total)",
|
||||
"legendFormat": "objects",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(rate(minio_s3_requests_total[1m]))",
|
||||
"legendFormat": "requests/s",
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"expr": "sum(rate(minio_s3_requests_errors_total[1m]))",
|
||||
"legendFormat": "errors/s",
|
||||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "MinIO storage",
|
||||
"id": 19,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 68
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(minio_cluster_usage_total_bytes)",
|
||||
"legendFormat": "used",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(minio_cluster_capacity_usable_free_bytes)",
|
||||
"legendFormat": "free",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bytes"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "row",
|
||||
"title": "Attachment pipeline",
|
||||
"id": 104,
|
||||
"collapsed": true,
|
||||
"gridPos": {
|
||||
"h": 1,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 76
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Pipeline availability and consumers",
|
||||
"id": 20,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 77
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(up{job=\"attachment-worker\"})",
|
||||
"legendFormat": "workers up",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(up{job=\"outbox-dispatcher\"})",
|
||||
"legendFormat": "dispatcher up",
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"expr": "max(redis_stream_group_consumers{job=\"redis-broker\",stream=\"attachment-jobs\",group=\"attachment-workers\"})",
|
||||
"legendFormat": "active consumers",
|
||||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Attachment upload results",
|
||||
"id": 21,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 77
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum by (result) (rate(messenger_attachment_uploads_total[1m]))",
|
||||
"legendFormat": "{{result}}",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(rate(messenger_attachment_upload_bytes_total[1m]))",
|
||||
"legendFormat": "bytes/s",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byFrameRefID",
|
||||
"options": "B"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "unit",
|
||||
"value": "Bps"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Worker throughput by result",
|
||||
"id": 22,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 85
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum by (result) (rate(messenger_attachment_worker_jobs_total[1m]))",
|
||||
"legendFormat": "{{result}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Worker processing latency p95",
|
||||
"id": 23,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 85
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_attachment_worker_job_duration_seconds_bucket[5m])))",
|
||||
"legendFormat": "p95",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_attachment_upload_duration_seconds_bucket[5m])))",
|
||||
"legendFormat": "upload p95",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Worker jobs in flight",
|
||||
"id": 24,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 93
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(messenger_attachment_worker_jobs_in_flight)",
|
||||
"legendFormat": "jobs",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Retries and reclaimed deliveries",
|
||||
"id": 25,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 93
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(messenger_attachment_worker_retries_total[1m]))",
|
||||
"legendFormat": "retries/s",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(rate(messenger_attachment_worker_reclaimed_deliveries_total[1m]))",
|
||||
"legendFormat": "reclaimed/s",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Outbox dispatcher",
|
||||
"id": 26,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 93
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(rate(messenger_outbox_published_total[1m]))",
|
||||
"legendFormat": "published/s",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "sum(rate(messenger_outbox_publish_failures_total[1m]))",
|
||||
"legendFormat": "failures/s",
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"expr": "sum(rate(messenger_outbox_recovered_leases_total[1m]))",
|
||||
"legendFormat": "recovered/s",
|
||||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "ops"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Redis Stream lag, PEL and DLQ",
|
||||
"id": 27,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 101
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "max(redis_stream_group_lag{job=\"redis-broker\",stream=\"attachment-jobs\",group=\"attachment-workers\"})",
|
||||
"legendFormat": "lag",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "max(redis_stream_group_messages_pending{job=\"redis-broker\",stream=\"attachment-jobs\",group=\"attachment-workers\"})",
|
||||
"legendFormat": "PEL",
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"expr": "max(redis_stream_length{job=\"redis-broker\",stream=\"attachment-jobs-failed\"})",
|
||||
"legendFormat": "DLQ",
|
||||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Redis Stream consumers",
|
||||
"id": 28,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 101
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "max(redis_stream_group_consumers{job=\"redis-broker\",stream=\"attachment-jobs\",group=\"attachment-workers\"})",
|
||||
"legendFormat": "consumers",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "max(redis_stream_group_consumer_idle_seconds{job=\"redis-broker\",stream=\"attachment-jobs\",group=\"attachment-workers\"})",
|
||||
"legendFormat": "max idle, seconds",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byFrameRefID",
|
||||
"options": "B"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "unit",
|
||||
"value": "s"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"refresh": "5s",
|
||||
"schemaVersion": 41,
|
||||
"tags": [
|
||||
"highload",
|
||||
"lab5",
|
||||
"pipeline"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-15m",
|
||||
"to": "now"
|
||||
},
|
||||
"timezone": "browser",
|
||||
"title": "Messenger lab5 overview",
|
||||
"uid": "messenger-lab5",
|
||||
"version": 3
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: Messenger
|
||||
folder: Highload
|
||||
type: file
|
||||
disableDeletion: true
|
||||
editable: false
|
||||
options:
|
||||
path: /etc/grafana/dashboards
|
||||
@@ -0,0 +1,10 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
uid: prometheus
|
||||
access: proxy
|
||||
url: http://prometheus:9090
|
||||
isDefault: true
|
||||
editable: false
|
||||
@@ -0,0 +1,39 @@
|
||||
messenger_attachment_jobs:
|
||||
query: |
|
||||
WITH statuses(status) AS (
|
||||
VALUES ('queued'), ('processing'), ('failed')
|
||||
)
|
||||
SELECT
|
||||
statuses.status,
|
||||
COUNT(j.id)::bigint AS count,
|
||||
COALESCE(EXTRACT(EPOCH FROM (clock_timestamp() - MIN(j.created_at))), 0)::double precision AS oldest_age_seconds
|
||||
FROM statuses
|
||||
LEFT JOIN attachment_jobs j ON j.status = statuses.status
|
||||
GROUP BY statuses.status
|
||||
metrics:
|
||||
- status:
|
||||
usage: LABEL
|
||||
description: Attachment job status.
|
||||
- count:
|
||||
usage: GAUGE
|
||||
description: Attachment jobs in this status.
|
||||
- oldest_age_seconds:
|
||||
usage: GAUGE
|
||||
description: Age of the oldest attachment job in this status.
|
||||
|
||||
messenger_outbox:
|
||||
query: |
|
||||
SELECT
|
||||
COUNT(*) FILTER (WHERE published_at IS NULL)::bigint AS pending,
|
||||
COALESCE(
|
||||
EXTRACT(EPOCH FROM (clock_timestamp() - MIN(created_at) FILTER (WHERE published_at IS NULL))),
|
||||
0
|
||||
)::double precision AS oldest_pending_age_seconds
|
||||
FROM outbox_events
|
||||
metrics:
|
||||
- pending:
|
||||
usage: GAUGE
|
||||
description: Unpublished outbox events.
|
||||
- oldest_pending_age_seconds:
|
||||
usage: GAUGE
|
||||
description: Age of the oldest unpublished outbox event.
|
||||
@@ -0,0 +1,43 @@
|
||||
global:
|
||||
scrape_interval: 1s
|
||||
evaluation_interval: 1s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: messenger
|
||||
dns_sd_configs:
|
||||
- names: ["api"]
|
||||
type: A
|
||||
port: 8080
|
||||
refresh_interval: 2s
|
||||
|
||||
- job_name: nginx
|
||||
static_configs:
|
||||
- targets: ["nginx-exporter:9113"]
|
||||
|
||||
- job_name: postgres
|
||||
static_configs:
|
||||
- targets: ["postgres-exporter:9187"]
|
||||
|
||||
- job_name: valkey
|
||||
static_configs:
|
||||
- targets: ["valkey-exporter:9121"]
|
||||
|
||||
- job_name: redis-broker
|
||||
static_configs:
|
||||
- targets: ["redis-broker-exporter:9121"]
|
||||
|
||||
- job_name: attachment-worker
|
||||
dns_sd_configs:
|
||||
- names: ["worker"]
|
||||
type: A
|
||||
port: 9091
|
||||
refresh_interval: 2s
|
||||
|
||||
- job_name: outbox-dispatcher
|
||||
static_configs:
|
||||
- targets: ["dispatcher:9091"]
|
||||
|
||||
- job_name: minio
|
||||
metrics_path: /minio/v2/metrics/cluster
|
||||
static_configs:
|
||||
- targets: ["s3:9000"]
|
||||
Reference in New Issue
Block a user