mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 15:08:24 +00:00
- Add SyncMetrics with full Prometheus integration - Track sync gaps via catchup events - Update Grafana dashboard with sync panels - Document all sync configuration options - Update design doc with implementation notes
1009 lines
31 KiB
JSON
1009 lines
31 KiB
JSON
{
|
|
"annotations": {
|
|
"list": []
|
|
},
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 0,
|
|
"id": null,
|
|
"links": [],
|
|
"liveNow": false,
|
|
"panels": [
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
|
|
"id": 1,
|
|
"title": "Overview",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "yellow", "value": 50 },
|
|
{ "color": "red", "value": 100 }
|
|
]
|
|
},
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 4, "x": 0, "y": 1 },
|
|
"id": 2,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"pluginVersion": "10.0.0",
|
|
"targets": [
|
|
{
|
|
"expr": "ngit_websocket_connections_active",
|
|
"legendFormat": "Active",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Active Connections",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null }
|
|
]
|
|
},
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 4, "x": 4, "y": 1 },
|
|
"id": 3,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "ngit_websocket_unique_ips",
|
|
"legendFormat": "Unique IPs",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Unique IPs",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "red", "value": 1 }
|
|
]
|
|
},
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 4, "x": 8, "y": 1 },
|
|
"id": 4,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "ngit_websocket_flagged_abusers",
|
|
"legendFormat": "Flagged",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Flagged Abusers",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [{ "color": "blue", "value": null }]
|
|
},
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 4, "x": 12, "y": 1 },
|
|
"id": 5,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "ngit_repositories_total",
|
|
"legendFormat": "Repos",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Total Repositories",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [{ "color": "green", "value": null }]
|
|
},
|
|
"unit": "s"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 4, "x": 16, "y": 1 },
|
|
"id": 6,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "ngit_uptime_seconds",
|
|
"legendFormat": "Uptime",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Uptime",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [{ "color": "purple", "value": null }]
|
|
},
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 4, "x": 20, "y": 1 },
|
|
"id": 7,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "value_and_name"
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "ngit_build_info",
|
|
"legendFormat": "{{version}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Version",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 },
|
|
"id": 10,
|
|
"title": "WebSocket Connections",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 10,
|
|
"gradientMode": "none",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": { "type": "linear" },
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"stacking": { "group": "A", "mode": "none" },
|
|
"thresholdsStyle": { "mode": "off" }
|
|
},
|
|
"mappings": [],
|
|
"thresholds": { "mode": "absolute", "steps": [] },
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 },
|
|
"id": 11,
|
|
"options": {
|
|
"legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "ngit_websocket_connections_active",
|
|
"legendFormat": "Active Connections",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "ngit_websocket_unique_ips",
|
|
"legendFormat": "Unique IPs",
|
|
"refId": "B"
|
|
}
|
|
],
|
|
"title": "Connections Over Time",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 10,
|
|
"gradientMode": "none",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": { "type": "linear" },
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"stacking": { "group": "A", "mode": "none" },
|
|
"thresholdsStyle": { "mode": "off" }
|
|
},
|
|
"mappings": [],
|
|
"thresholds": { "mode": "absolute", "steps": [] },
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 6 },
|
|
"id": 12,
|
|
"options": {
|
|
"legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "rate(ngit_websocket_messages_received_total[5m])",
|
|
"legendFormat": "Received: {{type}}",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "rate(ngit_websocket_messages_sent_total[5m])",
|
|
"legendFormat": "Sent: {{type}}",
|
|
"refId": "B"
|
|
}
|
|
],
|
|
"title": "Message Rate (5m)",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } },
|
|
"mappings": [],
|
|
"unit": "s"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 14 },
|
|
"id": 13,
|
|
"options": {
|
|
"legend": { "displayMode": "list", "placement": "right", "showLegend": true },
|
|
"pieType": "pie",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"tooltip": { "mode": "single", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "histogram_quantile(0.5, rate(ngit_websocket_connection_duration_seconds_bucket[1h]))",
|
|
"legendFormat": "p50",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "histogram_quantile(0.95, rate(ngit_websocket_connection_duration_seconds_bucket[1h]))",
|
|
"legendFormat": "p95",
|
|
"refId": "B"
|
|
},
|
|
{
|
|
"expr": "histogram_quantile(0.99, rate(ngit_websocket_connection_duration_seconds_bucket[1h]))",
|
|
"legendFormat": "p99",
|
|
"refId": "C"
|
|
}
|
|
],
|
|
"title": "Connection Duration Percentiles",
|
|
"type": "piechart"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 22 },
|
|
"id": 20,
|
|
"title": "Git Operations",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "bars",
|
|
"fillOpacity": 50,
|
|
"gradientMode": "none",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": { "type": "linear" },
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"stacking": { "group": "A", "mode": "normal" },
|
|
"thresholdsStyle": { "mode": "off" }
|
|
},
|
|
"mappings": [],
|
|
"thresholds": { "mode": "absolute", "steps": [] },
|
|
"unit": "ops"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 23 },
|
|
"id": 21,
|
|
"options": {
|
|
"legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "rate(ngit_git_operations_total{status=\"success\"}[5m])",
|
|
"legendFormat": "{{operation}} (success)",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "rate(ngit_git_operations_total{status=\"error\"}[5m])",
|
|
"legendFormat": "{{operation}} (error)",
|
|
"refId": "B"
|
|
}
|
|
],
|
|
"title": "Git Operations Rate (5m)",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 10,
|
|
"gradientMode": "none",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": { "type": "linear" },
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"stacking": { "group": "A", "mode": "none" },
|
|
"thresholdsStyle": { "mode": "off" }
|
|
},
|
|
"mappings": [],
|
|
"thresholds": { "mode": "absolute", "steps": [] },
|
|
"unit": "bytes"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 23 },
|
|
"id": 22,
|
|
"options": {
|
|
"legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "rate(ngit_git_bytes_total[5m])",
|
|
"legendFormat": "{{direction}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Git Bandwidth (5m)",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } },
|
|
"mappings": [],
|
|
"unit": "short"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": { "id": "byName", "options": "denied" },
|
|
"properties": [{ "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } }]
|
|
},
|
|
{
|
|
"matcher": { "id": "byName", "options": "allowed" },
|
|
"properties": [{ "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } }]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": { "h": 8, "w": 6, "x": 0, "y": 31 },
|
|
"id": 23,
|
|
"options": {
|
|
"legend": { "displayMode": "list", "placement": "right", "showLegend": true },
|
|
"pieType": "pie",
|
|
"reduceOptions": { "calcs": ["sum"], "fields": "", "values": false },
|
|
"tooltip": { "mode": "single", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "increase(ngit_git_push_authorization_total[24h])",
|
|
"legendFormat": "{{result}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Push Authorization (24h)",
|
|
"type": "piechart"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"mappings": [],
|
|
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] },
|
|
"unit": "bytes"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 18, "x": 6, "y": 31 },
|
|
"id": 24,
|
|
"options": {
|
|
"displayMode": "gradient",
|
|
"minVizHeight": 10,
|
|
"minVizWidth": 0,
|
|
"orientation": "horizontal",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"showUnfilled": true,
|
|
"valueMode": "color"
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "topk(10, ngit_git_top_repos_bytes)",
|
|
"legendFormat": "{{repo}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Top Repositories by Bandwidth",
|
|
"type": "bargauge"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 39 },
|
|
"id": 30,
|
|
"title": "Nostr Events",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 10,
|
|
"gradientMode": "none",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": { "type": "linear" },
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"stacking": { "group": "A", "mode": "none" },
|
|
"thresholdsStyle": { "mode": "off" }
|
|
},
|
|
"mappings": [],
|
|
"thresholds": { "mode": "absolute", "steps": [] },
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 40 },
|
|
"id": 31,
|
|
"options": {
|
|
"legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "rate(ngit_events_received_total[5m])",
|
|
"legendFormat": "Kind {{kind}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Events Received by Kind (5m)",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 10,
|
|
"gradientMode": "none",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": { "type": "linear" },
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"stacking": { "group": "A", "mode": "none" },
|
|
"thresholdsStyle": { "mode": "off" }
|
|
},
|
|
"mappings": [],
|
|
"thresholds": { "mode": "absolute", "steps": [] },
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 40 },
|
|
"id": 32,
|
|
"options": {
|
|
"legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "rate(ngit_events_stored_total[5m])",
|
|
"legendFormat": "Stored: Kind {{kind}}",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "rate(ngit_events_rejected_total[5m])",
|
|
"legendFormat": "Rejected: {{reason}}",
|
|
"refId": "B"
|
|
}
|
|
],
|
|
"title": "Events Stored vs Rejected (5m)",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 48 },
|
|
"id": 40,
|
|
"title": "Proactive Sync",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 10,
|
|
"gradientMode": "none",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": { "type": "linear" },
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"stacking": { "group": "A", "mode": "none" },
|
|
"thresholdsStyle": { "mode": "off" }
|
|
},
|
|
"mappings": [],
|
|
"thresholds": { "mode": "absolute", "steps": [] },
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 49 },
|
|
"id": 41,
|
|
"options": {
|
|
"legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "ngit_sync_relays_connected_total",
|
|
"legendFormat": "Connected",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "ngit_sync_relays_tracked_total",
|
|
"legendFormat": "Tracked",
|
|
"refId": "B"
|
|
},
|
|
{
|
|
"expr": "ngit_sync_relays_dead_total",
|
|
"legendFormat": "Dead",
|
|
"refId": "C"
|
|
}
|
|
],
|
|
"title": "Sync Relays Over Time",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } },
|
|
"mappings": [],
|
|
"unit": "short"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": { "id": "byName", "options": "healthy" },
|
|
"properties": [{ "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } }]
|
|
},
|
|
{
|
|
"matcher": { "id": "byName", "options": "degraded" },
|
|
"properties": [{ "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } }]
|
|
},
|
|
{
|
|
"matcher": { "id": "byName", "options": "dead" },
|
|
"properties": [{ "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } }]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": { "h": 8, "w": 6, "x": 12, "y": 49 },
|
|
"id": 42,
|
|
"options": {
|
|
"legend": { "displayMode": "list", "placement": "right", "showLegend": true },
|
|
"pieType": "pie",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"tooltip": { "mode": "single", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "count(ngit_sync_relay_status == 1)",
|
|
"legendFormat": "healthy",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "count(ngit_sync_relay_status == 2)",
|
|
"legendFormat": "degraded",
|
|
"refId": "B"
|
|
},
|
|
{
|
|
"expr": "count(ngit_sync_relay_status == 3)",
|
|
"legendFormat": "dead",
|
|
"refId": "C"
|
|
}
|
|
],
|
|
"title": "Relay Health Distribution",
|
|
"type": "piechart"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "yellow", "value": 1 },
|
|
{ "color": "red", "value": 5 }
|
|
]
|
|
},
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 3, "x": 18, "y": 49 },
|
|
"id": 43,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "ngit_sync_relays_dead_total",
|
|
"legendFormat": "Dead",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Dead Relays",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [{ "color": "blue", "value": null }]
|
|
},
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 3, "x": 21, "y": 49 },
|
|
"id": 44,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "ngit_sync_relays_connected_total",
|
|
"legendFormat": "Connected",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Connected Relays",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "bars",
|
|
"fillOpacity": 50,
|
|
"gradientMode": "none",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": { "type": "linear" },
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"stacking": { "group": "A", "mode": "normal" },
|
|
"thresholdsStyle": { "mode": "off" }
|
|
},
|
|
"mappings": [],
|
|
"thresholds": { "mode": "absolute", "steps": [] },
|
|
"unit": "short"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": { "id": "byName", "options": "success" },
|
|
"properties": [{ "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } }]
|
|
},
|
|
{
|
|
"matcher": { "id": "byName", "options": "failure" },
|
|
"properties": [{ "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } }]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": { "h": 4, "w": 6, "x": 18, "y": 53 },
|
|
"id": 45,
|
|
"options": {
|
|
"legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "increase(ngit_sync_connection_attempts_total{result=\"success\"}[5m])",
|
|
"legendFormat": "success",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "increase(ngit_sync_connection_attempts_total{result=\"failure\"}[5m])",
|
|
"legendFormat": "failure",
|
|
"refId": "B"
|
|
}
|
|
],
|
|
"title": "Connection Attempts (5m)",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 10,
|
|
"gradientMode": "none",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": { "type": "linear" },
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"stacking": { "group": "A", "mode": "none" },
|
|
"thresholdsStyle": { "mode": "off" }
|
|
},
|
|
"mappings": [],
|
|
"thresholds": { "mode": "absolute", "steps": [] },
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 57 },
|
|
"id": 46,
|
|
"options": {
|
|
"legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "rate(ngit_sync_events_total[5m])",
|
|
"legendFormat": "{{source}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Synced Events by Source (5m)",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "bars",
|
|
"fillOpacity": 50,
|
|
"gradientMode": "none",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"lineInterpolation": "linear",
|
|
"lineWidth": 1,
|
|
"pointSize": 5,
|
|
"scaleDistribution": { "type": "linear" },
|
|
"showPoints": "never",
|
|
"spanNulls": false,
|
|
"stacking": { "group": "A", "mode": "normal" },
|
|
"thresholdsStyle": { "mode": "off" }
|
|
},
|
|
"mappings": [],
|
|
"thresholds": { "mode": "absolute", "steps": [] },
|
|
"unit": "short"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 57 },
|
|
"id": 47,
|
|
"options": {
|
|
"legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"expr": "increase(ngit_sync_gap_events_total[1h])",
|
|
"legendFormat": "{{relay}}",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Gap Events Filled by Relay (1h)",
|
|
"type": "timeseries"
|
|
}
|
|
],
|
|
"refresh": "30s",
|
|
"schemaVersion": 38,
|
|
"style": "dark",
|
|
"tags": ["ngit-grasp", "nostr", "git"],
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"current": { "selected": false, "text": "Prometheus", "value": "Prometheus" },
|
|
"hide": 0,
|
|
"includeAll": false,
|
|
"label": "Datasource",
|
|
"multi": false,
|
|
"name": "datasource",
|
|
"options": [],
|
|
"query": "prometheus",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"type": "datasource"
|
|
}
|
|
]
|
|
},
|
|
"time": { "from": "now-6h", "to": "now" },
|
|
"timepicker": {},
|
|
"timezone": "browser",
|
|
"title": "ngit-grasp",
|
|
"uid": "ngit-grasp",
|
|
"version": 1,
|
|
"weekStart": ""
|
|
} |