ЛР7 на 4: HTTPS, mTLS, OpenBao AppRole и ротация leaf.
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Skeleton contracts / contracts (pull_request) Blocked by required conditions
Smoke/security/grade4/persistence/failover пройдены; REPORT и DEFENSE.
This commit is contained in:
@@ -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" } }
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
apiVersion: 1
|
||||
providers:
|
||||
- name: messenger
|
||||
orgId: 1
|
||||
folder: ""
|
||||
type: file
|
||||
disableDeletion: false
|
||||
updateIntervalSeconds: 30
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards
|
||||
@@ -0,0 +1,23 @@
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
uid: prometheus
|
||||
access: proxy
|
||||
url: http://prometheus:9090
|
||||
isDefault: true
|
||||
- name: Loki
|
||||
type: loki
|
||||
uid: loki
|
||||
access: proxy
|
||||
url: http://loki:3100
|
||||
- name: Tempo
|
||||
type: tempo
|
||||
uid: tempo
|
||||
access: proxy
|
||||
url: http://tempo:3200
|
||||
jsonData:
|
||||
tracesToLogsV2:
|
||||
datasourceUid: loki
|
||||
spanStartTimeShift: -1m
|
||||
spanEndTimeShift: 1m
|
||||
Reference in New Issue
Block a user