veza/config/grafana/dashboards/v1-overview.json

136 lines
7.5 KiB
JSON

{
"annotations": { "list": [] },
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "reqps", "color": { "mode": "palette-classic" } }, "overrides": [] },
"gridPos": { "h": 5, "w": 4, "x": 0, "y": 0 },
"id": 1,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\"}[5m])) or sum(rate(http_requests_total{job=~\"veza.*\"}[5m]))", "refId": "A" }],
"title": "req/s",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "s", "color": { "mode": "palette-classic" } }, "overrides": [] },
"gridPos": { "h": 5, "w": 4, "x": 4, "y": 0 },
"id": 2,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "histogram_quantile(0.50, sum(rate(veza_gin_http_request_duration_seconds_bucket{job=\"veza-backend\"}[5m])) by (le)) or histogram_quantile(0.50, sum(rate(http_request_duration_seconds_bucket{job=~\"veza.*\"}[5m])) by (le))", "refId": "A" }],
"title": "P50 Latency",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "s", "color": { "mode": "palette-classic" } }, "overrides": [] },
"gridPos": { "h": 5, "w": 4, "x": 8, "y": 0 },
"id": 3,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "histogram_quantile(0.95, sum(rate(veza_gin_http_request_duration_seconds_bucket{job=\"veza-backend\"}[5m])) by (le)) or histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{job=~\"veza.*\"}[5m])) by (le))", "refId": "A" }],
"title": "P95 Latency",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "s", "color": { "mode": "palette-classic" } }, "overrides": [] },
"gridPos": { "h": 5, "w": 4, "x": 12, "y": 0 },
"id": 4,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "histogram_quantile(0.99, sum(rate(veza_gin_http_request_duration_seconds_bucket{job=\"veza-backend\"}[5m])) by (le)) or histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket{job=~\"veza.*\"}[5m])) by (le))", "refId": "A" }],
"title": "P99 Latency",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "short", "color": { "mode": "palette-classic" } }, "overrides": [] },
"gridPos": { "h": 5, "w": 4, "x": 16, "y": 0 },
"id": 5,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\",status=~\"5..\"}[5m])) or sum(rate(http_requests_total{job=~\"veza.*\",status=~\"5..\"}[5m]))", "refId": "A" }],
"title": "5xx errors",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "short", "color": { "mode": "palette-classic" } }, "overrides": [] },
"gridPos": { "h": 5, "w": 4, "x": 20, "y": 0 },
"id": 6,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "veza_db_pool_open_connections{job=\"veza-backend\"} or pg_stat_activity_count", "refId": "A" }],
"title": "PG connections",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "short", "color": { "mode": "palette-classic" } }, "overrides": [] },
"gridPos": { "h": 5, "w": 4, "x": 0, "y": 5 },
"id": 7,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "redis_connected_clients or up{job=~\"redis.*\"}", "refId": "A" }],
"title": "Redis",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "percentunit", "color": { "mode": "palette-classic" } }, "overrides": [] },
"gridPos": { "h": 5, "w": 4, "x": 4, "y": 5 },
"id": 8,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100) or process_cpu_seconds_total", "refId": "A" }],
"title": "CPU",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "bytes", "color": { "mode": "palette-classic" } }, "overrides": [] },
"gridPos": { "h": 5, "w": 4, "x": 8, "y": 5 },
"id": 9,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "process_resident_memory_bytes{job=\"veza-backend\"} or node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes", "refId": "A" }],
"title": "RAM",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "reqps", "color": { "mode": "palette-classic" } }, "overrides": [] },
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 10 },
"id": 10,
"options": { "legend": { "displayMode": "list", "placement": "bottom" } },
"targets": [{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\"}[5m])) by (path, status)", "legendFormat": "{{path}} {{status}}", "refId": "A" }],
"title": "Request rate by path",
"type": "timeseries"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": { "defaults": { "unit": "s", "color": { "mode": "palette-classic" } }, "overrides": [] },
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 10 },
"id": 11,
"options": { "legend": { "displayMode": "list", "placement": "bottom" } },
"targets": [
{ "expr": "histogram_quantile(0.50, sum(rate(veza_gin_http_request_duration_seconds_bucket{job=\"veza-backend\"}[5m])) by (le))", "legendFormat": "p50", "refId": "A" },
{ "expr": "histogram_quantile(0.95, sum(rate(veza_gin_http_request_duration_seconds_bucket{job=\"veza-backend\"}[5m])) by (le))", "legendFormat": "p95", "refId": "B" },
{ "expr": "histogram_quantile(0.99, sum(rate(veza_gin_http_request_duration_seconds_bucket{job=\"veza-backend\"}[5m])) by (le))", "legendFormat": "p99", "refId": "C" }
],
"title": "Latency P50/P95/P99",
"type": "timeseries"
}
],
"refresh": "30s",
"schemaVersion": 38,
"style": "dark",
"tags": ["veza", "v1", "overview"],
"templating": { "list": [] },
"time": { "from": "now-1h", "to": "now" },
"timepicker": {},
"timezone": "browser",
"title": "Veza v1 Overview",
"uid": "veza-v1-overview",
"version": 1
}