ЛР7 на 4: HTTPS, mTLS, OpenBao AppRole и ротация leaf.
Skeleton contracts / contracts (pull_request) Blocked by required conditions

Smoke/security/grade4/persistence/failover пройдены; REPORT и DEFENSE.
This commit is contained in:
2026-12-02 23:08:27 +03:00
parent 20afc2c790
commit 2f2047909f
182 changed files with 15169 additions and 90 deletions
+102
View File
@@ -0,0 +1,102 @@
{
"uid": "gavrilenko-messenger-lab6",
"title": "Messenger lab6 (Gavrilenko)",
"schemaVersion": 39,
"version": 1,
"refresh": "5s",
"time": { "from": "now-15m", "to": "now" },
"panels": [
{
"id": 1,
"title": "HTTP RPS by status class",
"type": "timeseries",
"datasource": { "type": "prometheus", "uid": "prometheus" },
"gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 },
"targets": [
{
"expr": "sum by (status_class) (rate(http_server_requests_total{service_name=\"messenger-api\",route!~\"/health.*\"}[30s]))",
"legendFormat": "{{status_class}}"
}
],
"fieldConfig": { "defaults": { "unit": "reqps" } }
},
{
"id": 2,
"title": "API p50/p95/p99 (histogram)",
"type": "timeseries",
"datasource": { "type": "prometheus", "uid": "prometheus" },
"gridPos": { "x": 12, "y": 0, "w": 12, "h": 8 },
"targets": [
{ "expr": "histogram_quantile(0.50, sum(rate(http_server_duration_seconds_bucket{service_name=\"messenger-api\",route!~\"/health.*\"}[1m])) by (le))", "legendFormat": "p50" },
{ "expr": "histogram_quantile(0.95, sum(rate(http_server_duration_seconds_bucket{service_name=\"messenger-api\",route!~\"/health.*\"}[1m])) by (le))", "legendFormat": "p95" },
{ "expr": "histogram_quantile(0.99, sum(rate(http_server_duration_seconds_bucket{service_name=\"messenger-api\",route!~\"/health.*\"}[1m])) by (le))", "legendFormat": "p99" }
],
"fieldConfig": { "defaults": { "unit": "s" } }
},
{
"id": 3,
"title": "HAProxy 5xx ratio",
"type": "timeseries",
"datasource": { "type": "prometheus", "uid": "prometheus" },
"gridPos": { "x": 0, "y": 8, "w": 8, "h": 8 },
"targets": [
{
"expr": "sum(rate(haproxy_backend_http_responses_total{proxy=\"replicas\",code=\"5xx\"}[30s])) / clamp_min(sum(rate(haproxy_backend_http_responses_total{proxy=\"replicas\"}[30s])), 0.001)",
"legendFormat": "5xx ratio"
}
]
},
{
"id": 4,
"title": "Queue depth / oldest age (s)",
"type": "timeseries",
"datasource": { "type": "prometheus", "uid": "prometheus" },
"gridPos": { "x": 8, "y": 8, "w": 8, "h": 8 },
"targets": [
{ "expr": "max(messenger_queue_depth)", "legendFormat": "depth" },
{ "expr": "max(messenger_queue_oldest_age_seconds)", "legendFormat": "oldest age" }
]
},
{
"id": 5,
"title": "DB pool & worker saturation",
"type": "timeseries",
"datasource": { "type": "prometheus", "uid": "prometheus" },
"gridPos": { "x": 16, "y": 8, "w": 8, "h": 8 },
"targets": [
{ "expr": "max(messenger_db_pool_used)", "legendFormat": "pool used" },
{ "expr": "max(messenger_db_pool_limit)", "legendFormat": "pool limit" },
{ "expr": "max(messenger_worker_busy)", "legendFormat": "worker busy" },
{ "expr": "max(messenger_worker_capacity)", "legendFormat": "worker capacity" }
]
},
{
"id": 6,
"title": "Job outcomes",
"type": "timeseries",
"datasource": { "type": "prometheus", "uid": "prometheus" },
"gridPos": { "x": 0, "y": 16, "w": 12, "h": 8 },
"targets": [
{
"expr": "sum by (outcome) (rate(messenger_jobs_total{service_name=\"messenger-worker\"}[30s]))",
"legendFormat": "{{outcome}}"
}
],
"fieldConfig": { "defaults": { "unit": "reqps" } }
},
{
"id": 7,
"title": "Time to ready p95",
"type": "timeseries",
"datasource": { "type": "prometheus", "uid": "prometheus" },
"gridPos": { "x": 12, "y": 16, "w": 12, "h": 8 },
"targets": [
{
"expr": "histogram_quantile(0.95, sum(rate(messenger_attachment_ready_duration_seconds_bucket{service_name=\"messenger-worker\"}[1m])) by (le))",
"legendFormat": "p95 ready"
}
],
"fieldConfig": { "defaults": { "unit": "s" } }
}
]
}