Complete Lab 7 security and PKI track
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": null,
|
||||
"uid": "messenger-lab6",
|
||||
"title": "Messenger Lab 6 — Observability",
|
||||
"tags": ["mtusi", "messenger", "lab6"],
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 39,
|
||||
"version": 1,
|
||||
"refresh": "5s",
|
||||
"time": {"from": "now-15m", "to": "now"},
|
||||
"panels": [
|
||||
{"id": 1, "type": "timeseries", "title": "HTTP requests / second", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 0, "w": 12, "h": 8}, "targets": [{"expr": "sum(rate(messenger_http_server_requests_total{http_route!~\"/health.*\"}[5m]))", "legendFormat": "requests/s", "refId": "A"}]},
|
||||
{"id": 2, "type": "timeseries", "title": "HTTP 5xx ratio (SLI)", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 0, "w": 12, "h": 8}, "targets": [{"expr": "sum(rate(messenger_http_server_requests_total{http_response_status_class=\"5xx\",http_route!~\"/health.*\"}[5m])) / clamp_min(sum(rate(messenger_http_server_requests_total{http_route!~\"/health.*\"}[5m])), 0.001)", "legendFormat": "5xx / all", "refId": "A"}]},
|
||||
{"id": 3, "type": "timeseries", "title": "HTTP latency p50 / p95 / p99 (seconds)", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 8, "w": 12, "h": 8}, "targets": [{"expr": "histogram_quantile(0.50, sum by (le) (rate(messenger_http_server_duration_seconds_bucket[5m])))", "legendFormat": "p50", "refId": "A"}, {"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_http_server_duration_seconds_bucket[5m])))", "legendFormat": "p95", "refId": "B"}, {"expr": "histogram_quantile(0.99, sum by (le) (rate(messenger_http_server_duration_seconds_bucket[5m])))", "legendFormat": "p99", "refId": "C"}]},
|
||||
{"id": 4, "type": "timeseries", "title": "Worker jobs / second", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 8, "w": 12, "h": 8}, "targets": [{"expr": "sum by (outcome) (rate(messenger_jobs_processed_total[5m]))", "legendFormat": "{{outcome}}", "refId": "A"}]},
|
||||
{"id": 5, "type": "timeseries", "title": "Queue depth / oldest age (seconds)", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 16, "w": 12, "h": 8}, "targets": [{"expr": "messenger_queue_depth", "legendFormat": "queued", "refId": "A"}, {"expr": "messenger_queue_oldest_job_age_seconds", "legendFormat": "oldest seconds", "refId": "B"}]},
|
||||
{"id": 6, "type": "timeseries", "title": "Postgres pool used / capacity", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 16, "w": 12, "h": 8}, "targets": [{"expr": "sum(messenger_db_pool_used)", "legendFormat": "used", "refId": "A"}, {"expr": "sum(messenger_db_pool_capacity)", "legendFormat": "capacity", "refId": "B"}]},
|
||||
{"id": 7, "type": "timeseries", "title": "Process CPU / RAM", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 24, "w": 12, "h": 8}, "targets": [{"expr": "messenger_process_cpu_utilization_percent", "legendFormat": "cpu % {{service_role}}", "refId": "A"}, {"expr": "messenger_process_memory_usage_bytes", "legendFormat": "rss bytes {{service_role}}", "refId": "B"}]},
|
||||
{"id": 8, "type": "logs", "title": "Structured application logs", "datasource": {"type": "loki", "uid": "loki"}, "gridPos": {"x": 12, "y": 24, "w": 12, "h": 8}, "targets": [{"expr": "{service_name=~\"messenger-api|messenger-worker|messenger-dispatcher\"}", "queryType": "range", "refId": "A"}]},
|
||||
{"id": 9, "type": "timeseries", "title": "Worker active / capacity", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 0, "y": 32, "w": 12, "h": 8}, "targets": [{"expr": "sum(messenger_worker_active)", "legendFormat": "active", "refId": "A"}, {"expr": "sum(messenger_worker_capacity)", "legendFormat": "capacity", "refId": "B"}]},
|
||||
{"id": 10, "type": "timeseries", "title": "Attachment upload-to-ready latency p50 / p95 / p99", "datasource": {"type": "prometheus", "uid": "prometheus"}, "gridPos": {"x": 12, "y": 32, "w": 12, "h": 8}, "targets": [{"expr": "histogram_quantile(0.50, sum by (le) (rate(messenger_jobs_end_to_end_ready_duration_seconds_bucket[5m])))", "legendFormat": "p50", "refId": "A"}, {"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_jobs_end_to_end_ready_duration_seconds_bucket[5m])))", "legendFormat": "p95", "refId": "B"}, {"expr": "histogram_quantile(0.99, sum by (le) (rate(messenger_jobs_end_to_end_ready_duration_seconds_bucket[5m])))", "legendFormat": "p99", "refId": "C"}]}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user