Files
goodgo-platform/monitoring/grafana/dashboards/business-metrics.json
Ho Ngoc Hai d99dfbafbc feat(monitoring): add Prometheus metrics endpoint and Grafana dashboards
Add observability stack with @willsoto/nestjs-prometheus for /metrics endpoint,
Prometheus scraping config, and 4 auto-provisioned Grafana dashboards
(API overview, database, search, business metrics).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-08 03:08:54 +07:00

118 lines
2.9 KiB
JSON

{
"annotations": { "list": [] },
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"links": [],
"panels": [
{
"title": "Listings Created (rate)",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 },
"targets": [
{
"expr": "sum(rate(listings_created_total[5m])) by (category)",
"legendFormat": "{{category}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "ops",
"custom": { "drawStyle": "bars", "fillOpacity": 50 }
}
}
},
{
"title": "Listings Created (total)",
"type": "stat",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 },
"targets": [
{
"expr": "sum(increase(listings_created_total[24h]))",
"legendFormat": "Last 24h",
"refId": "A"
}
],
"fieldConfig": {
"defaults": { "unit": "short" }
}
},
{
"title": "Payments Processed (rate)",
"type": "timeseries",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 },
"targets": [
{
"expr": "sum(rate(payments_processed_total[5m])) by (status)",
"legendFormat": "{{status}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "ops",
"custom": { "drawStyle": "line", "fillOpacity": 10 }
}
}
},
{
"title": "Payment Success Rate",
"type": "gauge",
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 8 },
"targets": [
{
"expr": "sum(rate(payments_processed_total{status=\"success\"}[1h])) / sum(rate(payments_processed_total[1h]))",
"legendFormat": "Success Rate",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"min": 0,
"max": 1,
"thresholds": {
"steps": [
{ "color": "red", "value": null },
{ "color": "yellow", "value": 0.9 },
{ "color": "green", "value": 0.95 }
]
}
}
}
},
{
"title": "Active Subscriptions by Plan",
"type": "bargauge",
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 16 },
"targets": [
{
"expr": "active_subscriptions",
"legendFormat": "{{plan}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "short",
"thresholds": {
"steps": [
{ "color": "blue", "value": null }
]
}
}
}
}
],
"schemaVersion": 39,
"tags": ["goodgo", "business"],
"templating": { "list": [] },
"time": { "from": "now-1h", "to": "now" },
"timepicker": {},
"timezone": "browser",
"title": "GoodGo Business Metrics",
"uid": "goodgo-business",
"version": 1
}