ditto/grafana/Ditto-Dashboard.json
2024-09-21 11:36:08 -05:00

4824 lines
No EOL
134 KiB
JSON

{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
},
{
"name": "DS_DITTO-PG",
"label": "ditto-pg",
"description": "",
"type": "datasource",
"pluginId": "grafana-postgresql-datasource",
"pluginName": "PostgreSQL"
}
],
"__elements": {},
"__requires": [
{
"type": "panel",
"id": "bargauge",
"name": "Bar gauge",
"version": ""
},
{
"type": "panel",
"id": "gauge",
"name": "Gauge",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "11.2.0"
},
{
"type": "datasource",
"id": "grafana-postgresql-datasource",
"name": "PostgreSQL",
"version": "1.0.0"
},
{
"type": "panel",
"id": "piechart",
"name": "Pie chart",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "Ditto application performance",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 22,
"panels": [],
"title": "Overview",
"type": "row"
},
{
"datasource": {
"default": false,
"type": "prometheus",
"uid": "${prometheus}"
},
"description": "Responses sent back to users from the server. Organized by status code.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 1
},
"id": 10,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",path!=\"/relay\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",path!=\"/relay\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",path!=\"/relay\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",path!=\"/relay\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "HTTP Responses",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "Number of idle database connections available to the server. Higher is better. At 0, the site stops working.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-RdYlGr"
},
"mappings": [],
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "red",
"value": 0
},
{
"color": "#EAB839",
"value": 25
},
{
"color": "green",
"value": 50
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 0,
"y": 11
},
"id": 8,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "ditto_db_available_connections",
"instant": false,
"legendFormat": "Connections",
"range": true,
"refId": "A"
}
],
"title": "Database Available Connections",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "Usage of system resources.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 6,
"y": 11
},
"id": 20,
"options": {
"displayMode": "lcd",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showUnfilled": true,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "100 * (1 - avg(rate(node_cpu_seconds_total{mode=\"idle\"}[$__rate_interval])))",
"instant": false,
"legendFormat": "CPU",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "(1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100",
"hide": false,
"instant": false,
"legendFormat": "RAM",
"range": true,
"refId": "B"
}
],
"title": "System Usage",
"type": "bargauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "Number of individual database calls.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 18,
"y": 11
},
"id": 6,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_db_queries_total[$__rate_interval])",
"instant": false,
"legendFormat": "Queries",
"range": true,
"refId": "A"
}
],
"title": "Database Queries",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "Total number of Nostr clients currently connected to the Nostr relay.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 12,
"x": 6,
"y": 16
},
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "ditto_relay_connections",
"instant": false,
"legendFormat": "Connections",
"range": true,
"refId": "A"
}
],
"title": "Relay Connections",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "Number of Nostr events that are accepted or rejected by the custom policy script.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Accept"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "green",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "Reject"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "red",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 6,
"x": 0,
"y": 19
},
"id": 12,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_policy_events_total{ok=\"true\"}[$__rate_interval])",
"instant": false,
"legendFormat": "Accept",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_policy_events_total{ok=\"false\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "Reject",
"range": true,
"refId": "B"
}
],
"title": "Policy Events",
"type": "timeseries"
},
{
"datasource": {
"default": false,
"type": "prometheus",
"uid": "${prometheus}"
},
"description": "Sum duration of all queries in milliseconds.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "ms"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 18,
"y": 19
},
"id": 7,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_db_query_duration_ms_sum[$__rate_interval])",
"instant": false,
"legendFormat": "Time",
"range": true,
"refId": "A"
}
],
"title": "Database Query Time",
"type": "timeseries"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 27
},
"id": 27,
"panels": [
{
"datasource": {
"default": false,
"type": "prometheus",
"uid": "${prometheus}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 0,
"y": 33
},
"id": 34,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"GET\",path=\"/api/v1/timelines/home\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"GET\",path=\"/api/v1/timelines/home\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"GET\",path=\"/api/v1/timelines/home\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"GET\",path=\"/api/v1/timelines/home\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "GET /api/v1/timelines/home",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 6,
"y": 33
},
"id": 25,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"GET\",path=\"/api/v1/notifications\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"GET\",path=\"/api/v1/notifications\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"GET\",path=\"/api/v1/notifications\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"GET\",path=\"/api/v1/notifications\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "GET /api/v1/notifications",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 12,
"y": 33
},
"id": 31,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"GET\",path=\"/api/v1/accounts/verify_credentials\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"GET\",path=\"/api/v1/accounts/verify_credentials\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"GET\",path=\"/api/v1/accounts/verify_credentials\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"GET\",path=\"/api/v1/accounts/verify_credentials\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "GET /api/v1/accounts/verify_credentials",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 18,
"y": 33
},
"id": 32,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"POST\",path=\"/oauth/token\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"POST\",path=\"/oauth/token\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"POST\",path=\"/oauth/token\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"POST\",path=\"/oauth/token\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "POST /oauth/token",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 0,
"y": 40
},
"id": 30,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"GET\",path=\"/api/v1/instance\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"GET\",path=\"/api/v1/instance\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"GET\",path=\"/api/v1/instance\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"GET\",path=\"/api/v1/instance\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "GET /api/v1/instance",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 6,
"y": 40
},
"id": 35,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"GET\",path=\"/api/v1/timelines/public\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"GET\",path=\"/api/v1/timelines/public\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"GET\",path=\"/api/v1/timelines/public\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"GET\",path=\"/api/v1/timelines/public\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "GET /api/v1/timelines/public",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 12,
"y": 40
},
"id": 36,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"GET\",path=\"/api/v1/timelines/tag/:hashtag\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"GET\",path=\"/api/v1/timelines/tag/:hashtag\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"GET\",path=\"/api/v1/timelines/tag/:hashtag\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"GET\",path=\"/api/v1/timelines/tag/:hashtag\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "GET /api/v1/timelines/tag/:hashtag",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 18,
"y": 40
},
"id": 28,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"GET\",path=\"/api/v2/search\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"GET\",path=\"/api/v2/search\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"GET\",path=\"/api/v2/search\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"GET\",path=\"/api/v2/search\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "GET /api/v2/search",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 0,
"y": 47
},
"id": 26,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"POST\",path=\"/api/v1/statuses\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"POST\",path=\"/api/v1/statuses\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"POST\",path=\"/api/v1/statuses\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"POST\",path=\"/api/v1/statuses\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "POST /api/v1/statuses",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 6,
"y": 47
},
"id": 29,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"POST\",path=\"/api/v1/statuses/:id{[0-9a-f]{64}}/favourite\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"POST\",path=\"/api/v1/statuses/:id{[0-9a-f]{64}}/favourite\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"POST\",path=\"/api/v1/statuses/:id{[0-9a-f]{64}}/favourite\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"POST\",path=\"/api/v1/statuses/:id{[0-9a-f]{64}}/favourite\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "POST /api/v1/statuses/:id/favourite",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 12,
"y": 47
},
"id": 37,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"POST\",path=\"/api/v1/statuses/:id{[0-9a-f]{64}}/reblog\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"POST\",path=\"/api/v1/statuses/:id{[0-9a-f]{64}}/reblog\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"POST\",path=\"/api/v1/statuses/:id{[0-9a-f]{64}}/reblog\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"POST\",path=\"/api/v1/statuses/:id{[0-9a-f]{64}}/reblog\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "POST /api/v1/statuses/:id/reblog",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 25,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "Server Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Client Errors"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-blue",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Redirects"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-yellow",
"mode": "shades"
}
}
]
},
{
"matcher": {
"id": "byFrameRefID",
"options": "Success"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"mode": "shades"
}
}
]
}
]
},
"gridPos": {
"h": 7,
"w": 6,
"x": 18,
"y": 47
},
"id": 33,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"width": 225
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"5..\",method=\"POST\",path=\"/api/v1/ditto/zap\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Server Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"4..\",method=\"POST\",path=\"/api/v1/ditto/zap\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Client Errors"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"3..\",method=\"POST\",path=\"/api/v1/ditto/zap\"}[$__rate_interval])",
"hide": false,
"instant": false,
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Redirects"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "increase(ditto_http_responses_total{status=~\"2..\",method=\"POST\",path=\"/api/v1/ditto/zap\"}[$__rate_interval])",
"instant": false,
"interval": "",
"legendFormat": "{{method}} {{path}} ({{status}})",
"range": true,
"refId": "Success"
}
],
"title": "POST /api/v1/ditto/zap",
"type": "timeseries"
}
],
"title": "API",
"type": "row"
},
{
"collapsed": true,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 28
},
"id": 38,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "Number of link previews cached for URLs shared in statuses.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 0,
"y": 28
},
"id": 42,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "ditto_cached_link_previews_size",
"instant": false,
"legendFormat": "Values",
"range": true,
"refId": "A"
}
],
"title": "Link Previews",
"transparent": true,
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "Number of NIP-05 results cached for usernames that have been looked up.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 3,
"y": 28
},
"id": 41,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "ditto_cached_nip05s_size",
"instant": false,
"legendFormat": "Values",
"range": true,
"refId": "A"
}
],
"title": "NIP-05 Results",
"transparent": true,
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "Number of LNURL details cached for Lightning addresses.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 6,
"y": 28
},
"id": 40,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "ditto_cached_lnurls_size",
"instant": false,
"legendFormat": "Values",
"range": true,
"refId": "A"
}
],
"title": "LNURL Details",
"transparent": true,
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "Number of favicons cached for domain names.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 3,
"x": 9,
"y": 28
},
"id": 39,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "ditto_cached_favicons_size",
"instant": false,
"legendFormat": "Values",
"range": true,
"refId": "A"
}
],
"title": "Domain Favicons",
"transparent": true,
"type": "gauge"
}
],
"title": "Cache",
"type": "row"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 29
},
"id": 21,
"panels": [],
"title": "Database",
"type": "row"
},
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "${DS_DITTO-PG}"
},
"description": "SQL queries ranked by total time.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "super-light-green",
"value": 100
},
{
"color": "light-orange",
"value": 500
},
{
"color": "red",
"value": 1000
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "query"
},
"properties": [
{
"id": "displayName",
"value": "Query"
},
{
"id": "custom.inspect",
"value": true
},
{
"id": "custom.minWidth",
"value": 500
}
]
},
{
"matcher": {
"id": "byName",
"options": "total_time"
},
"properties": [
{
"id": "displayName",
"value": "Total Time"
},
{
"id": "unit",
"value": "ms"
},
{
"id": "decimals",
"value": 1
},
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "average_time"
},
"properties": [
{
"id": "displayName",
"value": "Average Time"
},
{
"id": "unit",
"value": "ms"
},
{
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "calls"
},
"properties": [
{
"id": "displayName",
"value": "Calls"
},
{
"id": "unit",
"value": "short"
},
{
"id": "decimals",
"value": 0
}
]
},
{
"matcher": {
"id": "byName",
"options": "total_percent"
},
"properties": [
{
"id": "displayName",
"value": "Total Percent"
},
{
"id": "unit",
"value": "percentunit"
},
{
"id": "decimals",
"value": 0
}
]
},
{
"matcher": {
"id": "byName",
"options": "max_time"
},
"properties": [
{
"id": "displayName",
"value": "Max Time"
},
{
"id": "unit",
"value": "ms"
},
{
"id": "custom.cellOptions",
"value": {
"type": "color-text"
}
}
]
}
]
},
"gridPos": {
"h": 11,
"w": 15,
"x": 0,
"y": 30
},
"id": 13,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"enablePagination": false,
"fields": "",
"reducer": [
"sum"
],
"show": true
},
"showHeader": true,
"sortBy": [
{
"desc": true,
"displayName": "Total Percent"
}
]
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "${DS_DITTO-PG}"
},
"editorMode": "code",
"format": "table",
"rawQuery": true,
"rawSql": "WITH query_stats AS (\n SELECT\n LEFT(query, 10000) AS query,\n (total_plan_time + total_exec_time) AS total_time,\n (mean_plan_time + mean_exec_time) AS average_time,\n (max_plan_time + max_exec_time) AS max_time,\n calls\n FROM\n pg_stat_statements\n WHERE\n calls > 0\n)\nSELECT\n query,\n total_time,\n average_time,\n max_time,\n calls,\n total_time / (SELECT SUM(total_time) FROM query_stats) AS total_percent\nFROM\n query_stats\nORDER BY\n total_time DESC\nLIMIT 100;\n",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "pg_stat_statements"
}
],
"title": "Query Performance",
"type": "table"
},
{
"datasource": {
"name": "${postgres}",
"type": "grafana-postgresql-datasource",
"uid": "${postgres}"
},
"description": "Index hit rate. Higher is better.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "table"
},
"properties": [
{
"id": "displayName",
"value": "Table"
},
{
"id": "custom.filterable",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "index"
},
"properties": [
{
"id": "displayName",
"value": "Index"
}
]
},
{
"matcher": {
"id": "byName",
"options": "percentage_used"
},
"properties": [
{
"id": "displayName",
"value": "Percentage Used"
},
{
"id": "unit",
"value": "percent"
},
{
"id": "custom.cellOptions",
"value": {
"mode": "lcd",
"type": "gauge",
"valueDisplayMode": "color"
}
},
{
"id": "color",
"value": {
"mode": "continuous-RdYlGr"
}
}
]
}
]
},
"gridPos": {
"h": 11,
"w": 9,
"x": 15,
"y": 30
},
"id": 14,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "${DS_DITTO-PG}"
},
"editorMode": "code",
"format": "table",
"rawQuery": true,
"rawSql": "SELECT \n relname AS table,\n indexrelname AS index,\n (idx_blks_hit * 100) / (CASE WHEN idx_blks_hit + idx_blks_read = 0 THEN 1 ELSE idx_blks_hit + idx_blks_read END) as percentage_used\nFROM \n pg_statio_user_indexes\nWHERE \n schemaname = 'public'\nORDER BY\n percentage_used DESC;",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"title": "Index Uses",
"type": "table"
},
{
"datasource": {
"name": "${postgres}",
"type": "grafana-postgresql-datasource",
"uid": "${postgres}"
},
"description": "Size of database tables.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"unit": "decbytes"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 7,
"x": 0,
"y": 41
},
"id": 16,
"options": {
"displayLabels": [
"name"
],
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"values": [
"value"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": true
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "${DS_DITTO-PG}"
},
"editorMode": "code",
"format": "table",
"rawQuery": true,
"rawSql": "SELECT\n c.relname AS table,\n pg_table_size(c.oid) AS size\nFROM\n pg_class c\n LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)\nWHERE\n n.nspname NOT IN ('pg_catalog', 'information_schema')\n AND n.nspname !~ '^pg_toast'\n AND c.relkind IN ('r', 'm')\nORDER BY\n pg_table_size(c.oid) DESC;",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"title": "Table Size",
"transformations": [
{
"id": "rowsToFields",
"options": {}
}
],
"type": "piechart"
},
{
"datasource": {
"name": "${postgres}",
"type": "grafana-postgresql-datasource",
"uid": "${postgres}"
},
"description": "Size of all indexes in the database.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": [],
"unit": "decbytes"
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 8,
"x": 7,
"y": 41
},
"id": 17,
"options": {
"displayLabels": [
"name"
],
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "right",
"showLegend": false,
"values": []
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": true
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.0.0",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "${DS_DITTO-PG}"
},
"editorMode": "code",
"format": "table",
"rawQuery": true,
"rawSql": "SELECT\n c.relname AS name,\n sum(c.relpages :: bigint * 8192) :: bigint AS size\nFROM\n pg_class c\n LEFT JOIN pg_namespace n ON (n.oid = c.relnamespace)\nWHERE\n n.nspname NOT IN ('pg_catalog', 'information_schema')\n AND n.nspname !~ '^pg_toast'\n AND c.relkind = 'i'\nGROUP BY\n (n.nspname, c.relname)\nORDER BY\n sum(c.relpages) DESC;",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"title": "Index Size",
"transformations": [
{
"id": "rowsToFields",
"options": {}
}
],
"type": "piechart"
},
{
"datasource": {
"name": "${postgres}",
"type": "grafana-postgresql-datasource",
"uid": "${postgres}"
},
"description": "Indexes that are not used or very rarely used.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "table"
},
"properties": [
{
"id": "displayName",
"value": "Table"
}
]
},
{
"matcher": {
"id": "byName",
"options": "index"
},
"properties": [
{
"id": "displayName",
"value": "Index"
}
]
},
{
"matcher": {
"id": "byName",
"options": "index_size"
},
"properties": [
{
"id": "displayName",
"value": "Size"
},
{
"id": "unit",
"value": "decbytes"
}
]
},
{
"matcher": {
"id": "byName",
"options": "index_scans"
},
"properties": [
{
"id": "displayName",
"value": "Scans"
},
{
"id": "unit",
"value": "short"
}
]
}
]
},
"gridPos": {
"h": 9,
"w": 9,
"x": 15,
"y": 41
},
"id": 18,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "11.2.0",
"targets": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "${DS_DITTO-PG}"
},
"editorMode": "code",
"format": "table",
"rawQuery": true,
"rawSql": "SELECT\n relname AS table,\n indexrelname AS index,\n pg_relation_size(i.indexrelid) AS index_size,\n idx_scan as index_scans\nFROM\n pg_stat_user_indexes ui\n JOIN pg_index i ON ui.indexrelid = i.indexrelid\nWHERE\n NOT indisunique\n AND idx_scan < 50\n AND pg_relation_size(relid) > 5 * 8192\nORDER BY\n pg_relation_size(i.indexrelid) / nullif(idx_scan, 0) DESC NULLS FIRST,\n pg_relation_size(i.indexrelid) DESC;",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"title": "Unused Indexes",
"type": "table"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 50
},
"id": 23,
"panels": [],
"title": "Nostr",
"type": "row"
},
{
"datasource": {
"default": false,
"type": "prometheus",
"uid": "${prometheus}"
},
"description": "Nostr messages sent to the relay over WebSocket.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "{instance=\"localhost:4036\", job=\"ditto\"}"
},
"properties": [
{
"id": "displayName",
"value": "Other"
},
{
"id": "color",
"value": {
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "REQ"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "purple",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "EVENT"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "light-blue",
"mode": "fixed"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "CLOSE"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "dark-yellow",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 51
},
"id": 9,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"exemplar": false,
"expr": "increase(ditto_relay_messages_total[$__rate_interval])",
"format": "time_series",
"instant": false,
"legendFormat": "{{verb}}",
"range": true,
"refId": "A"
}
],
"title": "Relay Messages",
"type": "timeseries"
},
{
"datasource": {
"default": false,
"type": "prometheus",
"uid": "${prometheus}"
},
"description": "Nostr events from all sources. Organized by kind.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Kind 0"
},
"properties": [
{
"id": "links",
"value": [
{
"targetBlank": true,
"title": "NIP-01",
"url": "https://github.com/nostr-protocol/nips/blob/master/01.md"
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "Kind 1"
},
"properties": [
{
"id": "links",
"value": [
{
"targetBlank": true,
"title": "NIP-01",
"url": "https://github.com/nostr-protocol/nips/blob/master/01.md"
}
]
}
]
}
]
},
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 63
},
"id": 5,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "increase(ditto_pipeline_events_total[$__rate_interval])",
"instant": false,
"legendFormat": "Kind {{kind}}",
"range": true,
"refId": "A"
}
],
"title": "Pipeline Events",
"type": "timeseries"
},
{
"datasource": {
"default": false,
"type": "prometheus",
"uid": "${prometheus}"
},
"description": "Rate of events being processed by different parts of the application.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 11,
"w": 24,
"x": 0,
"y": 75
},
"id": 19,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"maxHeight": 600,
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(increase(ditto_pipeline_events_total[$__rate_interval]))",
"instant": false,
"legendFormat": "Pipeline Events",
"range": true,
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "${prometheus}"
},
"editorMode": "code",
"expr": "sum(increase(ditto_relay_events_total[$__rate_interval]))",
"hide": false,
"instant": false,
"legendFormat": "Relay Events",
"range": true,
"refId": "B"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"editorMode": "code",
"expr": "sum(increase(ditto_firehose_events_total[$__rate_interval]))",
"hide": false,
"instant": false,
"legendFormat": "Firehose Events",
"range": true,
"refId": "C"
}
],
"title": "Event Sources",
"type": "timeseries"
}
],
"refresh": "5s",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"datasource": {
"type": "grafana-postgresql-datasource",
"uid": "cdtcs576ar7cwb"
},
"filters": [],
"hide": 0,
"name": "Filters",
"skipUrlSync": false,
"type": "adhoc"
},
{
"current": {},
"description": "Prometheus datasource",
"hide": 0,
"includeAll": false,
"label": "Prometheus",
"multi": false,
"name": "prometheus",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"current": {},
"description": "PostgreSQL datasource",
"hide": 0,
"includeAll": false,
"label": "Postgres",
"multi": false,
"name": "postgres",
"options": [],
"query": "grafana-postgresql-datasource",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
"time": {
"from": "now-3h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "Ditto",
"uid": "ddps3ap51fv28d",
"version": 9,
"weekStart": ""
}