feat(monitoring): add 3 Grafana dashboards (API, Chat, Commerce)

- api-overview.json: request rate, p95 latency, 5xx errors, DB pool
- chat-overview.json: WebSocket upgrade rate, chat API
- commerce-overview.json: marketplace/commerce/orders metrics
- system-overview.json: replaces veza-dashboard.json
This commit is contained in:
senke 2026-02-23 19:54:01 +01:00
parent 0ff8a85684
commit c002e74031
5 changed files with 362 additions and 26 deletions

View file

@ -0,0 +1,136 @@
{
"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": 6, "w": 6, "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]))", "refId": "A" }],
"title": "Request rate (req/s)",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "s", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 6, "w": 6, "x": 6, "y": 0 },
"id": 2,
"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))", "refId": "A" }],
"title": "p95 Latency (s)",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "short", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 6, "w": 6, "x": 12, "y": 0 },
"id": 3,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\",status=~\"5..\"}[5m]))", "refId": "A" }],
"title": "5xx errors rate",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "short", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 6, "w": 6, "x": 18, "y": 0 },
"id": 4,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "veza_db_pool_open_connections{job=\"veza-backend\"}", "refId": "A" }],
"title": "DB pool connections",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "reqps", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 },
"id": 5,
"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": 6 },
"id": 6,
"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 percentiles",
"type": "timeseries"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "short", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 14 },
"id": 7,
"options": { "legend": { "displayMode": "list", "placement": "bottom" } },
"targets": [{ "expr": "sum(rate(veza_errors_by_http_status_total{job=\"veza-backend\"}[5m])) by (http_status)", "legendFormat": "{{http_status}}", "refId": "A" }],
"title": "Error rate by HTTP status",
"type": "timeseries"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "short", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 14 },
"id": 8,
"options": { "legend": { "displayMode": "list", "placement": "bottom" } },
"targets": [
{ "expr": "veza_db_pool_open_connections{job=\"veza-backend\"}", "legendFormat": "open", "refId": "A" },
{ "expr": "veza_db_pool_in_use{job=\"veza-backend\"}", "legendFormat": "in_use", "refId": "B" },
{ "expr": "veza_db_pool_idle{job=\"veza-backend\"}", "legendFormat": "idle", "refId": "C" }
],
"title": "DB pool stats",
"type": "timeseries"
}
],
"refresh": "30s",
"schemaVersion": 38,
"style": "dark",
"tags": ["veza", "api"],
"templating": { "list": [] },
"time": { "from": "now-1h", "to": "now" },
"timepicker": {},
"timezone": "browser",
"title": "Veza API Overview",
"uid": "veza-api-overview",
"version": 1
}

View file

@ -0,0 +1,87 @@
{
"annotations": { "list": [] },
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "short", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 6, "w": 8, "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\",path=~\".*ws.*\"}[5m]))", "refId": "A" }],
"title": "WebSocket upgrade rate",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "short", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 6, "w": 8, "x": 8, "y": 0 },
"id": 2,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "up{job=\"veza-backend\"}", "refId": "A" }],
"title": "Backend up",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "s", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 6, "w": 8, "x": 16, "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\",path=~\".*ws.*\"}[5m])) by (le))", "refId": "A" }],
"title": "WS upgrade p95 latency",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "reqps", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 },
"id": 4,
"options": { "legend": { "displayMode": "list", "placement": "bottom" } },
"targets": [{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\",path=~\".*ws.*\"}[5m]))", "legendFormat": "WebSocket upgrades", "refId": "A" }],
"title": "Chat WebSocket connection rate",
"type": "timeseries"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "short", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 6 },
"id": 5,
"options": { "legend": { "displayMode": "list", "placement": "bottom" } },
"targets": [{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\",path=~\".*chat.*\"}[5m])) by (path)", "legendFormat": "{{path}}", "refId": "A" }],
"title": "Chat API request rate",
"type": "timeseries"
}
],
"refresh": "30s",
"schemaVersion": 38,
"style": "dark",
"tags": ["veza", "chat"],
"templating": { "list": [] },
"time": { "from": "now-1h", "to": "now" },
"timepicker": {},
"timezone": "browser",
"title": "Veza Chat Overview",
"uid": "veza-chat-overview",
"version": 1
}

View file

@ -0,0 +1,104 @@
{
"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": 6, "w": 6, "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\",path=~\".*marketplace.*\"}[5m]))", "refId": "A" }],
"title": "Marketplace request rate",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "reqps", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 6, "w": 6, "x": 6, "y": 0 },
"id": 2,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\",path=~\".*commerce.*\"}[5m]))", "refId": "A" }],
"title": "Commerce request rate",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "s", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 6, "w": 6, "x": 12, "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\",path=~\".*marketplace.*|.*commerce.*\"}[5m])) by (le))", "refId": "A" }],
"title": "Commerce p95 latency",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "short", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 6, "w": 6, "x": 18, "y": 0 },
"id": 4,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\",path=~\".*orders.*\",status=~\"2..\"}[5m]))", "refId": "A" }],
"title": "Orders success rate",
"type": "stat"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "reqps", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 },
"id": 5,
"options": { "legend": { "displayMode": "list", "placement": "bottom" } },
"targets": [{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\",path=~\".*marketplace.*|.*commerce.*\"}[5m])) by (path)", "legendFormat": "{{path}}", "refId": "A" }],
"title": "Commerce endpoints by path",
"type": "timeseries"
},
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "short", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 6 },
"id": 6,
"options": { "legend": { "displayMode": "list", "placement": "bottom" } },
"targets": [
{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\",path=~\".*orders.*\"}[5m]))", "legendFormat": "orders", "refId": "A" },
{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\",path=~\".*cart.*\"}[5m]))", "legendFormat": "cart", "refId": "B" },
{ "expr": "sum(rate(veza_gin_http_requests_total{job=\"veza-backend\",path=~\".*refund.*\"}[5m]))", "legendFormat": "refund", "refId": "C" }
],
"title": "Orders, cart, refund rate",
"type": "timeseries"
}
],
"refresh": "30s",
"schemaVersion": 38,
"style": "dark",
"tags": ["veza", "commerce"],
"templating": { "list": [] },
"time": { "from": "now-1h", "to": "now" },
"timepicker": {},
"timezone": "browser",
"title": "Veza Commerce Overview",
"uid": "veza-commerce-overview",
"version": 1
}

View file

@ -0,0 +1,35 @@
{
"annotations": { "list": [] },
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": { "type": "prometheus", "uid": "prometheus" },
"fieldConfig": {
"defaults": { "unit": "short", "color": { "mode": "palette-classic" } },
"overrides": []
},
"gridPos": { "h": 6, "w": 12, "x": 0, "y": 0 },
"id": 1,
"options": { "reduceOptions": { "calcs": ["lastNotNull"] }, "orientation": "auto", "showThresholdLabels": false },
"targets": [{ "expr": "up", "legendFormat": "{{job}}", "refId": "A" }],
"title": "System Overview",
"type": "stat"
}
],
"refresh": "30s",
"schemaVersion": 38,
"style": "dark",
"tags": ["veza", "local", "system"],
"templating": { "list": [] },
"time": { "from": "now-1h", "to": "now" },
"timepicker": {},
"timezone": "browser",
"title": "Veza System Overview",
"uid": "veza-system-overview",
"version": 1
}

View file

@ -1,26 +0,0 @@
{
"dashboard": {
"id": null,
"title": "Veza Platform - Local Dashboard",
"tags": ["veza", "local"],
"style": "dark",
"timezone": "browser",
"panels": [
{
"id": 1,
"title": "System Overview",
"type": "stat",
"targets": [
{
"expr": "up",
"legendFormat": "{{job}}"
}
]
}
],
"time": {
"from": "now-1h",
"to": "now"
}
}
}