{ "uid": "lab6-telemetry", "title": "Lab 6 ยท Messenger signals", "tags": [ "lab6" ], "timezone": "browser", "schemaVersion": 40, "version": 2, "refresh": "10s", "time": { "from": "now-1h", "to": "now" }, "panels": [ { "id": 1, "type": "timeseries", "title": "Stores", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "up{job=~\"prometheus|otel-collector|loki|tempo\"}", "legendFormat": "{{job}}" } ], "fieldConfig": { "defaults": { "unit": "short", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 } }, { "id": 2, "type": "timeseries", "title": "HTTP RPS", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "sum(rate(messenger_http_requests_total{route!~\"/health/.*\"}[1m]))", "legendFormat": "series 1" } ], "fieldConfig": { "defaults": { "unit": "reqps", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 } }, { "id": 3, "type": "timeseries", "title": "HTTP 5xx ratio", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "sum(rate(messenger_http_requests_total{status_class=\"5xx\",route!~\"/health/.*\"}[1m])) / clamp_min(sum(rate(messenger_http_requests_total{route!~\"/health/.*\"}[1m])),0.001)", "legendFormat": "series 1" } ], "fieldConfig": { "defaults": { "unit": "percentunit", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 } }, { "id": 4, "type": "timeseries", "title": "HTTP p50/p95/p99", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "histogram_quantile(0.50,sum by(le)(rate(messenger_http_duration_seconds_bucket{route!~\"/health/.*\"}[5m])))", "legendFormat": "series 1" }, { "refId": "B", "expr": "histogram_quantile(0.95,sum by(le)(rate(messenger_http_duration_seconds_bucket{route!~\"/health/.*\"}[5m])))", "legendFormat": "series 2" }, { "refId": "C", "expr": "histogram_quantile(0.99,sum by(le)(rate(messenger_http_duration_seconds_bucket{route!~\"/health/.*\"}[5m])))", "legendFormat": "series 3" } ], "fieldConfig": { "defaults": { "unit": "s", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 } }, { "id": 5, "type": "timeseries", "title": "Job outcomes", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "sum by(outcome)(rate(messenger_jobs_processed_total[1m]))", "legendFormat": "{{outcome}}" } ], "fieldConfig": { "defaults": { "unit": "ops", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 16 } }, { "id": 6, "type": "timeseries", "title": "Job p95/p99", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "histogram_quantile(0.95,sum by(le)(rate(messenger_jobs_duration_seconds_bucket[5m])))", "legendFormat": "series 1" }, { "refId": "B", "expr": "histogram_quantile(0.99,sum by(le)(rate(messenger_jobs_duration_seconds_bucket[5m])))", "legendFormat": "series 2" } ], "fieldConfig": { "defaults": { "unit": "s", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 16 } }, { "id": 7, "type": "timeseries", "title": "Queue depth", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "sum(messenger_queue_depth{queue_name=\"attachments.process\"} and (time()-timestamp(messenger_queue_depth{queue_name=\"attachments.process\"})<15))", "legendFormat": "series 1" } ], "fieldConfig": { "defaults": { "unit": "short", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 24 } }, { "id": 8, "type": "timeseries", "title": "Oldest queued job", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "max(messenger_queue_oldest_age_seconds{queue_name=\"attachments.process\"} and (time()-timestamp(messenger_queue_oldest_age_seconds{queue_name=\"attachments.process\"})<15))", "legendFormat": "series 1" } ], "fieldConfig": { "defaults": { "unit": "s", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 24 } }, { "id": 9, "type": "timeseries", "title": "DB pool used / waiting", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "sum by(service_name)(messenger_db_pool_used)", "legendFormat": "series 1" }, { "refId": "B", "expr": "sum by(service_name)(messenger_db_pool_waiting)", "legendFormat": "series 2" } ], "fieldConfig": { "defaults": { "unit": "short", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 32 } }, { "id": 10, "type": "timeseries", "title": "Worker busy / capacity", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "sum(messenger_worker_busy)", "legendFormat": "series 1" }, { "refId": "B", "expr": "sum(messenger_worker_capacity)", "legendFormat": "series 2" } ], "fieldConfig": { "defaults": { "unit": "short", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 32 } }, { "id": 11, "type": "timeseries", "title": "Time to ready p50/p95/p99", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "histogram_quantile(0.50,sum by(le)(rate(messenger_attachments_ready_duration_seconds_bucket[5m])))", "legendFormat": "series 1" }, { "refId": "B", "expr": "histogram_quantile(0.95,sum by(le)(rate(messenger_attachments_ready_duration_seconds_bucket[5m])))", "legendFormat": "series 2" }, { "refId": "C", "expr": "histogram_quantile(0.99,sum by(le)(rate(messenger_attachments_ready_duration_seconds_bucket[5m])))", "legendFormat": "series 3" } ], "fieldConfig": { "defaults": { "unit": "s", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 40 } }, { "id": 12, "type": "timeseries", "title": "Process CPU", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "sum by(service_name)(rate(messenger_process_cpu_time_seconds_total[1m]))", "legendFormat": "series 1" } ], "fieldConfig": { "defaults": { "unit": "short", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 40 } }, { "id": 13, "type": "timeseries", "title": "Process RSS", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "sum by(service_name)(messenger_process_rss_bytes)", "legendFormat": "series 1" } ], "fieldConfig": { "defaults": { "unit": "bytes", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 48 } }, { "id": 14, "type": "timeseries", "title": "Collector queue / failures", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "otelcol_exporter_queue_size{job=\"otel-collector\"}", "legendFormat": "series 1" }, { "refId": "B", "expr": "sum(rate(otelcol_exporter_send_failed_metric_points_total[1m]))", "legendFormat": "series 2" }, { "refId": "C", "expr": "sum(rate(otelcol_exporter_send_failed_log_records_total[1m]))", "legendFormat": "series 3" }, { "refId": "D", "expr": "sum(rate(otelcol_exporter_send_failed_spans_total[1m]))", "legendFormat": "series 4" } ], "fieldConfig": { "defaults": { "unit": "short", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 48 } }, { "id": 15, "type": "timeseries", "title": "Alerts firing", "datasource": { "type": "prometheus", "uid": "prometheus" }, "targets": [ { "refId": "A", "expr": "ALERTS{alertstate=\"firing\",alertname=~\"Lab6.*\"}", "legendFormat": "{{alertname}}" } ], "fieldConfig": { "defaults": { "unit": "short", "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" } }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 56 } } ] }