clickhouse.json
· 4.9 KiB · JSON
原始檔案
{
"params": {
"rounding": "60",
"seconds": "600"
},
"queries": [
{
"title": "Request rate",
"query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n count() AS requests\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n"
},
{
"title": "Unique Request IP",
"query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n uniqExact(remote_ip) AS unique_ips\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n"
},
{
"title": "Average request bytes",
"query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n avg(bytes_sent) AS avg_bytes_sent\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n"
},
{
"title": "Average response time costs",
"query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n avg(duration_ms) AS avg_response_time_ms\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n"
},
{
"title": "Gitea Crawler Percentage",
"query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n countIf(\n host = 'git.aiursoft.cn' \n AND uri LIKE '/PublicVault%' \n AND uri LIKE '%commit%'\n ) / count() AS crawler_ratio\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n"
},
{
"title": "HTTP Code distribution",
"query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n countIf(status >= 100 AND status < 200) / count() AS ratio_1xx,\n countIf(status >= 200 AND status < 300) / count() AS ratio_2xx,\n countIf(status >= 300 AND status < 400) / count() AS ratio_3xx,\n countIf(status >= 400 AND status < 500) / count() AS ratio_4xx,\n countIf(status >= 500 AND status < 600) / count() AS ratio_5xx\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n"
},
{
"title": "Requests by host distribution",
"query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n sumIf(1, host = 'git.aiursoft.cn') AS Gitea,\n sumIf(1, host = 'nextcloud.aiursoft.cn') AS Nextcloud,\n sumIf(1, host = 'stathub.aiursoft.cn') AS Stathub,\n sumIf(1, host = 'hub.aiursoft.cn') AS DockerHub,\n sumIf(1, host = 'gitlab.aiursoft.cn') AS GitLab,\n sumIf(1, host = 'auth.aiursoft.cn') AS Auth,\n sumIf(1, host = 'wiki.aiursoft.cn') AS Wiki,\n sumIf(1, host = 'remotely.aiursoft.cn') AS Remotely,\n -- Others:统计 host 不在上述列表中的所有请求\n sumIf(\n 1,\n host NOT IN (\n 'git.aiursoft.cn',\n 'nextcloud.aiursoft.cn',\n 'stathub.aiursoft.cn',\n 'hub.aiursoft.cn',\n 'gitlab.aiursoft.cn',\n 'auth.aiursoft.cn',\n 'wiki.aiursoft.cn',\n 'remotely.aiursoft.cn'\n )\n ) AS Others\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n"
},
{
"title": "Methods distribution",
"query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n sumIf(1, method = 'GET') AS GET,\n sumIf(1, method = 'POST') AS POST,\n sumIf(1, method = 'OPTIONS') AS OPTIONS,\n sumIf(1, method = 'PROPFIND') AS PROPFIND,\n sumIf(\n 1,\n method NOT IN ('GET','POST','OPTIONS', 'PROPFIND')\n ) AS Others\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n"
},
{
"title": "Request Size P50 P95",
"query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n quantile(0.5)(bytes_sent) AS p50_bytes,\n quantile(0.95)(bytes_sent) AS p95_bytes\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n"
},
{
"title": "Requst Latancy P95 P99",
"query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n quantile(0.95)(duration_ms) AS p95_latency_ms,\n quantile(0.99)(duration_ms) AS p99_latency_ms\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n"
}
]
}
1 | { |
2 | "params": { |
3 | "rounding": "60", |
4 | "seconds": "600" |
5 | }, |
6 | "queries": [ |
7 | { |
8 | "title": "Request rate", |
9 | "query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n count() AS requests\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n" |
10 | }, |
11 | { |
12 | "title": "Unique Request IP", |
13 | "query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n uniqExact(remote_ip) AS unique_ips\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n" |
14 | }, |
15 | { |
16 | "title": "Average request bytes", |
17 | "query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n avg(bytes_sent) AS avg_bytes_sent\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n" |
18 | }, |
19 | { |
20 | "title": "Average response time costs", |
21 | "query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n avg(duration_ms) AS avg_response_time_ms\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n" |
22 | }, |
23 | { |
24 | "title": "Gitea Crawler Percentage", |
25 | "query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n countIf(\n host = 'git.aiursoft.cn' \n AND uri LIKE '/PublicVault%' \n AND uri LIKE '%commit%'\n ) / count() AS crawler_ratio\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n" |
26 | }, |
27 | { |
28 | "title": "HTTP Code distribution", |
29 | "query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n countIf(status >= 100 AND status < 200) / count() AS ratio_1xx,\n countIf(status >= 200 AND status < 300) / count() AS ratio_2xx,\n countIf(status >= 300 AND status < 400) / count() AS ratio_3xx,\n countIf(status >= 400 AND status < 500) / count() AS ratio_4xx,\n countIf(status >= 500 AND status < 600) / count() AS ratio_5xx\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n" |
30 | }, |
31 | { |
32 | "title": "Requests by host distribution", |
33 | "query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n sumIf(1, host = 'git.aiursoft.cn') AS Gitea,\n sumIf(1, host = 'nextcloud.aiursoft.cn') AS Nextcloud,\n sumIf(1, host = 'stathub.aiursoft.cn') AS Stathub,\n sumIf(1, host = 'hub.aiursoft.cn') AS DockerHub,\n sumIf(1, host = 'gitlab.aiursoft.cn') AS GitLab,\n sumIf(1, host = 'auth.aiursoft.cn') AS Auth,\n sumIf(1, host = 'wiki.aiursoft.cn') AS Wiki,\n sumIf(1, host = 'remotely.aiursoft.cn') AS Remotely,\n -- Others:统计 host 不在上述列表中的所有请求\n sumIf(\n 1,\n host NOT IN (\n 'git.aiursoft.cn',\n 'nextcloud.aiursoft.cn',\n 'stathub.aiursoft.cn',\n 'hub.aiursoft.cn',\n 'gitlab.aiursoft.cn',\n 'auth.aiursoft.cn',\n 'wiki.aiursoft.cn',\n 'remotely.aiursoft.cn'\n )\n ) AS Others\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n" |
34 | }, |
35 | { |
36 | "title": "Methods distribution", |
37 | "query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n sumIf(1, method = 'GET') AS GET,\n sumIf(1, method = 'POST') AS POST,\n sumIf(1, method = 'OPTIONS') AS OPTIONS,\n sumIf(1, method = 'PROPFIND') AS PROPFIND,\n sumIf(\n 1,\n method NOT IN ('GET','POST','OPTIONS', 'PROPFIND')\n ) AS Others\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n" |
38 | }, |
39 | { |
40 | "title": "Request Size P50 P95", |
41 | "query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n quantile(0.5)(bytes_sent) AS p50_bytes,\n quantile(0.95)(bytes_sent) AS p95_bytes\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n" |
42 | }, |
43 | { |
44 | "title": "Requst Latancy P95 P99", |
45 | "query": "SELECT\n toStartOfInterval(ts, INTERVAL {rounding:UInt32} SECOND)::Int64 AS t,\n quantile(0.95)(duration_ms) AS p95_latency_ms,\n quantile(0.99)(duration_ms) AS p99_latency_ms\nFROM logs.caddy_requests\nWHERE ts >= now() - {seconds:UInt32}\nGROUP BY t\nORDER BY t\nWITH FILL STEP {rounding:UInt32}\n" |
46 | } |
47 | ] |
48 | } |
grafana.json
· 60 KiB · JSON
原始檔案
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 3,
"links": [],
"liveNow": true,
"panels": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"fieldMinMax": false,
"mappings": [],
"max": 41943040,
"min": 0,
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "orange",
"value": 70
},
{
"color": "red",
"value": 85
}
]
},
"unit": "binBps"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 3,
"x": 0,
"y": 0
},
"id": 29,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n sum(bytes_sent) / (($__toTime) - ($__fromTime)) AS bytes_per_second\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n",
"refId": "A"
}
],
"title": "Average KB per second",
"type": "gauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "orange",
"value": 70
},
{
"color": "red",
"value": 85
}
]
},
"unit": "reqps"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 3,
"x": 3,
"y": 0
},
"id": 30,
"options": {
"minVizHeight": 75,
"minVizWidth": 75,
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true,
"sizing": "auto"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n count() / dateDiff('second', $__fromTime, $__toTime) AS avg_requests_per_second\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n",
"refId": "A"
}
],
"title": "Average Throughput",
"type": "gauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"mappings": []
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 3,
"x": 6,
"y": 0
},
"id": 26,
"options": {
"displayLabels": [
"name"
],
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"pieType": "donut",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "/^request_count$/",
"values": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n toString(status) AS status,\n count() AS request_count\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY status\nORDER BY request_count DESC\n",
"refId": "A"
}
],
"title": "Status Code Distribution",
"type": "piechart"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 3,
"x": 9,
"y": 0
},
"id": 21,
"options": {
"displayMode": "gradient",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [],
"fields": "",
"values": true
},
"showUnfilled": false,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n method AS method,\n count() AS request_count\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY method\nORDER BY request_count DESC\n",
"refId": "A"
}
],
"title": "Method Distribution",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"max": 700,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 240
}
]
},
"unit": "ms"
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 3,
"x": 12,
"y": 0
},
"id": 31,
"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.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n quantile(0.95)(duration_ms) AS current_p95_response_time_ms\nFROM logs.caddy_requests\nWHERE ts BETWEEN $__fromTime AND $__toTime\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n",
"refId": "A"
}
],
"title": "P95 Latancy",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-YlRd"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "hue",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"displayName": "Count",
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 1000
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 9,
"x": 15,
"y": 0
},
"id": 27,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT $__timeInterval(ts) as \"time\", count(ts) FROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip like '%${IP}%'\n GROUP BY time",
"refId": "A"
}
],
"title": "Requests Trend",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 30
}
]
},
"unit": "ms"
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 3,
"x": 12,
"y": 2
},
"id": 34,
"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.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n quantile(0.80)(duration_ms) AS current_p95_response_time_ms\nFROM logs.caddy_requests\nWHERE ts BETWEEN $__fromTime AND $__toTime\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n",
"refId": "A"
}
],
"title": "P80 Latancy",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"max": 16,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 5
}
]
},
"unit": "ms"
},
"overrides": []
},
"gridPos": {
"h": 2,
"w": 3,
"x": 12,
"y": 4
},
"id": 33,
"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.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n quantile(0.5)(duration_ms) AS current_median_response_time_ms\nFROM logs.caddy_requests\nWHERE ts BETWEEN $__fromTime AND $__toTime\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n",
"refId": "A"
}
],
"title": "Middle Latancy",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 5,
"x": 0,
"y": 6
},
"id": 5,
"options": {
"displayMode": "lcd",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [],
"fields": "/^requests$/",
"limit": 10,
"values": true
},
"showUnfilled": true,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n host as Application,\n count() AS requests\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip like '%${IP}%'\nGROUP BY Application\nORDER BY requests DESC\n\n",
"refId": "A"
}
],
"title": "Requests By Count",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 5,
"x": 5,
"y": 6
},
"id": 6,
"options": {
"displayMode": "lcd",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [],
"fields": "",
"limit": 10,
"values": true
},
"showUnfilled": true,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n host AS Application,\n uniqExact(remote_ip) AS unique_ip_count\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Application\nORDER BY unique_ip_count DESC\n\n",
"refId": "A"
}
],
"title": "Requests By Unique IP Count (IPs)",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 5,
"x": 10,
"y": 6
},
"id": 7,
"options": {
"displayMode": "lcd",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [],
"fields": "",
"limit": 10,
"values": true
},
"showUnfilled": true,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n host AS Application,\n sum(duration_ms)/1000 AS total_duration_seconds\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Application\nORDER BY total_duration_seconds DESC",
"refId": "A"
}
],
"title": "Total Time costs (Seconds)",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 5,
"x": 15,
"y": 6
},
"id": 28,
"options": {
"displayMode": "lcd",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [],
"fields": "",
"limit": 10,
"values": true
},
"showUnfilled": true,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n host AS Application,\n sum(bytes_sent) AS total_duration_seconds\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Application\nORDER BY total_duration_seconds DESC",
"refId": "A"
}
],
"title": "Total Bytes Sent (MB)",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 20,
"y": 6
},
"id": 9,
"options": {
"displayMode": "lcd",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [],
"fields": "",
"limit": 10,
"values": true
},
"showUnfilled": true,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n host AS Application,\n round(countIf(status >= 500) / count() * 100, 2) AS failure_rate_percent\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Application\nORDER BY failure_rate_percent DESC\n",
"refId": "A"
}
],
"title": "500 Failure Rate%",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"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": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "orange",
"value": 70
},
{
"color": "red",
"value": 85
}
]
},
"unit": "ms"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 5,
"x": 0,
"y": 14
},
"id": 3,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n $__timeInterval(ts) AS \"time\",\n quantile(0.95)(duration_ms) AS p95_response_time_ms\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY time\nORDER BY time",
"refId": "A"
}
],
"title": "Requests Latancy P95",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"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": 6,
"w": 5,
"x": 5,
"y": 14
},
"id": 10,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n $__timeInterval(ts) AS \"time\",\n uniqExact(remote_ip) AS unique_ip_count\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY time\nORDER BY time;",
"refId": "A"
}
],
"title": "Incoming Unique IPs Count",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "points",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 3,
"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": 6,
"w": 5,
"x": 10,
"y": 14
},
"id": 11,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n $__timeInterval(ts) AS \"time\",\n sum(duration_ms) AS total_duration_ms\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY time\nORDER BY time;",
"refId": "A"
}
],
"title": "Processing Requests Total Time Costs",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"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": "binBps"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 5,
"x": 15,
"y": 14
},
"id": 12,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n $__timeInterval(ts) AS time,\n sum(bytes_sent) / $__interval_s AS bytes_per_second\nFROM logs.caddy_requests\nWHERE\n $__timeFilter(ts)\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY\n time\nORDER BY\n time ASC",
"refId": "A"
}
],
"title": "Upload Bandwidth",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"fixedColor": "dark-red",
"mode": "fixed"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "series",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "points",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 2,
"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": 6,
"w": 4,
"x": 20,
"y": 14
},
"id": 13,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n $__timeInterval(ts) AS \"time\",\n countIf(status >= 500) AS failure_count\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY time\nORDER BY time;",
"refId": "A"
}
],
"title": "Requests 500 Count",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-BlYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 9,
"x": 0,
"y": 20
},
"id": 15,
"options": {
"displayMode": "gradient",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "/^requests$/",
"limit": 25,
"values": true
},
"showUnfilled": false,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n concat(host, splitByChar('?', uri)[1]) AS Path,\n count() AS requests\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Path\nORDER BY requests DESC\n",
"refId": "A"
}
],
"title": "Hot Interfaces",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "ms"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 9,
"x": 9,
"y": 20
},
"id": 18,
"options": {
"displayMode": "gradient",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "/^avg_response_time_ms$/",
"limit": 25,
"values": true
},
"showUnfilled": false,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n concat(host, splitByChar('?', uri)[1]) AS Path,\n avg(duration_ms) AS avg_response_time_ms\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n AND status != '101'\nGROUP BY Path\nORDER BY avg_response_time_ms DESC\n",
"refId": "A"
}
],
"title": "Slow Interface",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 18,
"y": 20
},
"id": 14,
"options": {
"displayMode": "gradient",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "/^count$/",
"limit": 20,
"values": true
},
"showUnfilled": false,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT remote_ip, COUNT(*) AS count\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY remote_ip\nORDER BY count DESC;",
"refId": "A"
}
],
"title": "Incoming IPs",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 9,
"x": 0,
"y": 28
},
"id": 16,
"options": {
"displayMode": "gradient",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "/^requests$/",
"limit": 25,
"values": true
},
"showUnfilled": false,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n concat(host, splitByChar('?', uri)[1]) AS Path,\n count() AS requests\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n AND status >= 500\nGROUP BY Path\nORDER BY requests DESC\n",
"refId": "A"
}
],
"title": "Error Interface",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 9,
"x": 9,
"y": 28
},
"id": 17,
"options": {
"displayMode": "basic",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "/^failure_rate_percent$/",
"limit": 25,
"values": true
},
"showUnfilled": false,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n concat(host, splitByChar('?', uri)[1]) AS Path,\n round(countIf(status >= 500) / count() * 100, 2) AS failure_rate_percent\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Path\nORDER BY failure_rate_percent DESC\n",
"refId": "A"
}
],
"title": "Error Rate Interface",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-GrYlRd"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 18,
"y": 28
},
"id": 32,
"options": {
"displayMode": "gradient",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "/^total_bytes_sent$/",
"limit": 20,
"values": true
},
"showUnfilled": false,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "11.1.3",
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"columns": [],
"database": "",
"limit": 1000,
"mode": "list",
"queryType": "table",
"table": ""
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n remote_ip,\n sum(bytes_sent) AS total_bytes_sent\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY remote_ip\nORDER BY total_bytes_sent DESC;\n",
"refId": "A"
}
],
"title": "Sent data to IPs",
"type": "bargauge"
},
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"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": []
},
"gridPos": {
"h": 9,
"w": 24,
"x": 0,
"y": 36
},
"id": 1,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true,
"sortBy": [
{
"desc": false,
"displayName": "status"
}
]
},
"pluginVersion": "11.1.3",
"targets": [
{
"builderOptions": {
"aggregates": [],
"columns": [
{
"alias": "level",
"custom": false,
"name": "level",
"type": "LowCardinality(String)"
},
{
"alias": "remote_ip",
"custom": false,
"name": "remote_ip",
"type": "String"
}
],
"database": "logs",
"filters": [],
"groupBy": [],
"limit": 1000,
"meta": {},
"mode": "list",
"orderBy": [],
"queryType": "table",
"table": "caddy_requests"
},
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "fet9b6miuomwwf"
},
"editorType": "sql",
"format": 1,
"meta": {
"builderOptions": {
"aggregates": [],
"columns": [
{
"alias": "level",
"custom": false,
"name": "level",
"type": "LowCardinality(String)"
},
{
"alias": "remote_ip",
"custom": false,
"name": "remote_ip",
"type": "String"
}
],
"database": "logs",
"filters": [],
"groupBy": [],
"limit": 1000,
"meta": {},
"mode": "list",
"orderBy": [],
"queryType": "table",
"table": "caddy_requests"
}
},
"pluginVersion": "4.10.1",
"queryType": "table",
"rawSql": "SELECT\n remote_ip, method, host, uri, status, bytes_sent, duration_ms\t\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nORDER BY ts DESC\nLIMIT 200",
"refId": "Hot Application"
}
],
"title": "RAW",
"type": "table"
}
],
"refresh": "30s",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "",
"value": ""
},
"description": "Application",
"hide": 0,
"label": "Application",
"name": "Application",
"options": [
{
"selected": true,
"text": "",
"value": ""
}
],
"query": "",
"skipUrlSync": false,
"type": "textbox"
},
{
"current": {
"selected": false,
"text": "",
"value": ""
},
"description": "IP",
"hide": 0,
"label": "IP",
"name": "IP",
"options": [
{
"selected": true,
"text": "",
"value": ""
}
],
"query": "",
"skipUrlSync": false,
"type": "textbox"
}
]
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "Caddy",
"uid": "eet9bprvewlq8e",
"version": 54,
"weekStart": ""
}
1 | { |
2 | "annotations": { |
3 | "list": [ |
4 | { |
5 | "builtIn": 1, |
6 | "datasource": { |
7 | "type": "grafana", |
8 | "uid": "-- Grafana --" |
9 | }, |
10 | "enable": true, |
11 | "hide": true, |
12 | "iconColor": "rgba(0, 211, 255, 1)", |
13 | "name": "Annotations & Alerts", |
14 | "type": "dashboard" |
15 | } |
16 | ] |
17 | }, |
18 | "editable": true, |
19 | "fiscalYearStartMonth": 0, |
20 | "graphTooltip": 0, |
21 | "id": 3, |
22 | "links": [], |
23 | "liveNow": true, |
24 | "panels": [ |
25 | { |
26 | "datasource": { |
27 | "type": "grafana-clickhouse-datasource", |
28 | "uid": "fet9b6miuomwwf" |
29 | }, |
30 | "fieldConfig": { |
31 | "defaults": { |
32 | "fieldMinMax": false, |
33 | "mappings": [], |
34 | "max": 41943040, |
35 | "min": 0, |
36 | "thresholds": { |
37 | "mode": "percentage", |
38 | "steps": [ |
39 | { |
40 | "color": "green", |
41 | "value": null |
42 | }, |
43 | { |
44 | "color": "orange", |
45 | "value": 70 |
46 | }, |
47 | { |
48 | "color": "red", |
49 | "value": 85 |
50 | } |
51 | ] |
52 | }, |
53 | "unit": "binBps" |
54 | }, |
55 | "overrides": [] |
56 | }, |
57 | "gridPos": { |
58 | "h": 6, |
59 | "w": 3, |
60 | "x": 0, |
61 | "y": 0 |
62 | }, |
63 | "id": 29, |
64 | "options": { |
65 | "minVizHeight": 75, |
66 | "minVizWidth": 75, |
67 | "orientation": "auto", |
68 | "reduceOptions": { |
69 | "calcs": [ |
70 | "lastNotNull" |
71 | ], |
72 | "fields": "", |
73 | "values": false |
74 | }, |
75 | "showThresholdLabels": false, |
76 | "showThresholdMarkers": true, |
77 | "sizing": "auto" |
78 | }, |
79 | "pluginVersion": "11.1.3", |
80 | "targets": [ |
81 | { |
82 | "datasource": { |
83 | "type": "grafana-clickhouse-datasource", |
84 | "uid": "fet9b6miuomwwf" |
85 | }, |
86 | "editorType": "sql", |
87 | "format": 1, |
88 | "meta": { |
89 | "builderOptions": { |
90 | "columns": [], |
91 | "database": "", |
92 | "limit": 1000, |
93 | "mode": "list", |
94 | "queryType": "table", |
95 | "table": "" |
96 | } |
97 | }, |
98 | "pluginVersion": "4.10.1", |
99 | "queryType": "table", |
100 | "rawSql": "SELECT\n sum(bytes_sent) / (($__toTime) - ($__fromTime)) AS bytes_per_second\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n", |
101 | "refId": "A" |
102 | } |
103 | ], |
104 | "title": "Average KB per second", |
105 | "type": "gauge" |
106 | }, |
107 | { |
108 | "datasource": { |
109 | "type": "grafana-clickhouse-datasource", |
110 | "uid": "fet9b6miuomwwf" |
111 | }, |
112 | "fieldConfig": { |
113 | "defaults": { |
114 | "mappings": [], |
115 | "max": 100, |
116 | "min": 0, |
117 | "thresholds": { |
118 | "mode": "percentage", |
119 | "steps": [ |
120 | { |
121 | "color": "green", |
122 | "value": null |
123 | }, |
124 | { |
125 | "color": "orange", |
126 | "value": 70 |
127 | }, |
128 | { |
129 | "color": "red", |
130 | "value": 85 |
131 | } |
132 | ] |
133 | }, |
134 | "unit": "reqps" |
135 | }, |
136 | "overrides": [] |
137 | }, |
138 | "gridPos": { |
139 | "h": 6, |
140 | "w": 3, |
141 | "x": 3, |
142 | "y": 0 |
143 | }, |
144 | "id": 30, |
145 | "options": { |
146 | "minVizHeight": 75, |
147 | "minVizWidth": 75, |
148 | "orientation": "auto", |
149 | "reduceOptions": { |
150 | "calcs": [ |
151 | "lastNotNull" |
152 | ], |
153 | "fields": "", |
154 | "values": false |
155 | }, |
156 | "showThresholdLabels": false, |
157 | "showThresholdMarkers": true, |
158 | "sizing": "auto" |
159 | }, |
160 | "pluginVersion": "11.1.3", |
161 | "targets": [ |
162 | { |
163 | "datasource": { |
164 | "type": "grafana-clickhouse-datasource", |
165 | "uid": "fet9b6miuomwwf" |
166 | }, |
167 | "editorType": "sql", |
168 | "format": 1, |
169 | "meta": { |
170 | "builderOptions": { |
171 | "columns": [], |
172 | "database": "", |
173 | "limit": 1000, |
174 | "mode": "list", |
175 | "queryType": "table", |
176 | "table": "" |
177 | } |
178 | }, |
179 | "pluginVersion": "4.10.1", |
180 | "queryType": "table", |
181 | "rawSql": "SELECT\n count() / dateDiff('second', $__fromTime, $__toTime) AS avg_requests_per_second\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n", |
182 | "refId": "A" |
183 | } |
184 | ], |
185 | "title": "Average Throughput", |
186 | "type": "gauge" |
187 | }, |
188 | { |
189 | "datasource": { |
190 | "type": "grafana-clickhouse-datasource", |
191 | "uid": "fet9b6miuomwwf" |
192 | }, |
193 | "fieldConfig": { |
194 | "defaults": { |
195 | "color": { |
196 | "mode": "palette-classic" |
197 | }, |
198 | "custom": { |
199 | "hideFrom": { |
200 | "legend": false, |
201 | "tooltip": false, |
202 | "viz": false |
203 | } |
204 | }, |
205 | "mappings": [] |
206 | }, |
207 | "overrides": [] |
208 | }, |
209 | "gridPos": { |
210 | "h": 6, |
211 | "w": 3, |
212 | "x": 6, |
213 | "y": 0 |
214 | }, |
215 | "id": 26, |
216 | "options": { |
217 | "displayLabels": [ |
218 | "name" |
219 | ], |
220 | "legend": { |
221 | "displayMode": "list", |
222 | "placement": "bottom", |
223 | "showLegend": false |
224 | }, |
225 | "pieType": "donut", |
226 | "reduceOptions": { |
227 | "calcs": [ |
228 | "lastNotNull" |
229 | ], |
230 | "fields": "/^request_count$/", |
231 | "values": true |
232 | }, |
233 | "tooltip": { |
234 | "mode": "single", |
235 | "sort": "none" |
236 | } |
237 | }, |
238 | "pluginVersion": "11.1.3", |
239 | "targets": [ |
240 | { |
241 | "datasource": { |
242 | "type": "grafana-clickhouse-datasource", |
243 | "uid": "fet9b6miuomwwf" |
244 | }, |
245 | "editorType": "sql", |
246 | "format": 1, |
247 | "meta": { |
248 | "builderOptions": { |
249 | "columns": [], |
250 | "database": "", |
251 | "limit": 1000, |
252 | "mode": "list", |
253 | "queryType": "table", |
254 | "table": "" |
255 | } |
256 | }, |
257 | "pluginVersion": "4.10.1", |
258 | "queryType": "table", |
259 | "rawSql": "SELECT\n toString(status) AS status,\n count() AS request_count\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY status\nORDER BY request_count DESC\n", |
260 | "refId": "A" |
261 | } |
262 | ], |
263 | "title": "Status Code Distribution", |
264 | "type": "piechart" |
265 | }, |
266 | { |
267 | "datasource": { |
268 | "type": "grafana-clickhouse-datasource", |
269 | "uid": "fet9b6miuomwwf" |
270 | }, |
271 | "fieldConfig": { |
272 | "defaults": { |
273 | "color": { |
274 | "mode": "palette-classic" |
275 | }, |
276 | "mappings": [], |
277 | "thresholds": { |
278 | "mode": "absolute", |
279 | "steps": [ |
280 | { |
281 | "color": "green", |
282 | "value": null |
283 | }, |
284 | { |
285 | "color": "red", |
286 | "value": 80 |
287 | } |
288 | ] |
289 | }, |
290 | "unit": "short" |
291 | }, |
292 | "overrides": [] |
293 | }, |
294 | "gridPos": { |
295 | "h": 6, |
296 | "w": 3, |
297 | "x": 9, |
298 | "y": 0 |
299 | }, |
300 | "id": 21, |
301 | "options": { |
302 | "displayMode": "gradient", |
303 | "maxVizHeight": 300, |
304 | "minVizHeight": 16, |
305 | "minVizWidth": 8, |
306 | "namePlacement": "auto", |
307 | "orientation": "horizontal", |
308 | "reduceOptions": { |
309 | "calcs": [], |
310 | "fields": "", |
311 | "values": true |
312 | }, |
313 | "showUnfilled": false, |
314 | "sizing": "auto", |
315 | "valueMode": "color" |
316 | }, |
317 | "pluginVersion": "11.1.3", |
318 | "targets": [ |
319 | { |
320 | "datasource": { |
321 | "type": "grafana-clickhouse-datasource", |
322 | "uid": "fet9b6miuomwwf" |
323 | }, |
324 | "editorType": "sql", |
325 | "format": 1, |
326 | "meta": { |
327 | "builderOptions": { |
328 | "columns": [], |
329 | "database": "", |
330 | "limit": 1000, |
331 | "mode": "list", |
332 | "queryType": "table", |
333 | "table": "" |
334 | } |
335 | }, |
336 | "pluginVersion": "4.10.1", |
337 | "queryType": "table", |
338 | "rawSql": "SELECT\n method AS method,\n count() AS request_count\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY method\nORDER BY request_count DESC\n", |
339 | "refId": "A" |
340 | } |
341 | ], |
342 | "title": "Method Distribution", |
343 | "type": "bargauge" |
344 | }, |
345 | { |
346 | "datasource": { |
347 | "type": "grafana-clickhouse-datasource", |
348 | "uid": "fet9b6miuomwwf" |
349 | }, |
350 | "fieldConfig": { |
351 | "defaults": { |
352 | "color": { |
353 | "mode": "thresholds" |
354 | }, |
355 | "mappings": [], |
356 | "max": 700, |
357 | "min": 0, |
358 | "thresholds": { |
359 | "mode": "absolute", |
360 | "steps": [ |
361 | { |
362 | "color": "green", |
363 | "value": null |
364 | }, |
365 | { |
366 | "color": "red", |
367 | "value": 240 |
368 | } |
369 | ] |
370 | }, |
371 | "unit": "ms" |
372 | }, |
373 | "overrides": [] |
374 | }, |
375 | "gridPos": { |
376 | "h": 2, |
377 | "w": 3, |
378 | "x": 12, |
379 | "y": 0 |
380 | }, |
381 | "id": 31, |
382 | "options": { |
383 | "displayMode": "lcd", |
384 | "maxVizHeight": 300, |
385 | "minVizHeight": 16, |
386 | "minVizWidth": 8, |
387 | "namePlacement": "auto", |
388 | "orientation": "horizontal", |
389 | "reduceOptions": { |
390 | "calcs": [ |
391 | "lastNotNull" |
392 | ], |
393 | "fields": "", |
394 | "values": false |
395 | }, |
396 | "showUnfilled": true, |
397 | "sizing": "auto", |
398 | "valueMode": "color" |
399 | }, |
400 | "pluginVersion": "11.1.3", |
401 | "targets": [ |
402 | { |
403 | "datasource": { |
404 | "type": "grafana-clickhouse-datasource", |
405 | "uid": "fet9b6miuomwwf" |
406 | }, |
407 | "editorType": "sql", |
408 | "format": 1, |
409 | "meta": { |
410 | "builderOptions": { |
411 | "columns": [], |
412 | "database": "", |
413 | "limit": 1000, |
414 | "mode": "list", |
415 | "queryType": "table", |
416 | "table": "" |
417 | } |
418 | }, |
419 | "pluginVersion": "4.10.1", |
420 | "queryType": "table", |
421 | "rawSql": "SELECT\n quantile(0.95)(duration_ms) AS current_p95_response_time_ms\nFROM logs.caddy_requests\nWHERE ts BETWEEN $__fromTime AND $__toTime\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n", |
422 | "refId": "A" |
423 | } |
424 | ], |
425 | "title": "P95 Latancy", |
426 | "type": "bargauge" |
427 | }, |
428 | { |
429 | "datasource": { |
430 | "type": "grafana-clickhouse-datasource", |
431 | "uid": "fet9b6miuomwwf" |
432 | }, |
433 | "fieldConfig": { |
434 | "defaults": { |
435 | "color": { |
436 | "mode": "continuous-YlRd" |
437 | }, |
438 | "custom": { |
439 | "axisBorderShow": false, |
440 | "axisCenteredZero": false, |
441 | "axisColorMode": "text", |
442 | "axisLabel": "", |
443 | "axisPlacement": "auto", |
444 | "barAlignment": 0, |
445 | "drawStyle": "line", |
446 | "fillOpacity": 0, |
447 | "gradientMode": "hue", |
448 | "hideFrom": { |
449 | "legend": false, |
450 | "tooltip": false, |
451 | "viz": false |
452 | }, |
453 | "insertNulls": false, |
454 | "lineInterpolation": "linear", |
455 | "lineStyle": { |
456 | "fill": "solid" |
457 | }, |
458 | "lineWidth": 1, |
459 | "pointSize": 5, |
460 | "scaleDistribution": { |
461 | "type": "linear" |
462 | }, |
463 | "showPoints": "auto", |
464 | "spanNulls": false, |
465 | "stacking": { |
466 | "group": "A", |
467 | "mode": "none" |
468 | }, |
469 | "thresholdsStyle": { |
470 | "mode": "off" |
471 | } |
472 | }, |
473 | "displayName": "Count", |
474 | "mappings": [], |
475 | "thresholds": { |
476 | "mode": "absolute", |
477 | "steps": [ |
478 | { |
479 | "color": "green", |
480 | "value": null |
481 | }, |
482 | { |
483 | "color": "red", |
484 | "value": 1000 |
485 | } |
486 | ] |
487 | } |
488 | }, |
489 | "overrides": [] |
490 | }, |
491 | "gridPos": { |
492 | "h": 6, |
493 | "w": 9, |
494 | "x": 15, |
495 | "y": 0 |
496 | }, |
497 | "id": 27, |
498 | "options": { |
499 | "legend": { |
500 | "calcs": [], |
501 | "displayMode": "table", |
502 | "placement": "bottom", |
503 | "showLegend": false |
504 | }, |
505 | "tooltip": { |
506 | "mode": "single", |
507 | "sort": "none" |
508 | } |
509 | }, |
510 | "targets": [ |
511 | { |
512 | "datasource": { |
513 | "type": "grafana-clickhouse-datasource", |
514 | "uid": "fet9b6miuomwwf" |
515 | }, |
516 | "editorType": "sql", |
517 | "format": 1, |
518 | "meta": { |
519 | "builderOptions": { |
520 | "columns": [], |
521 | "database": "", |
522 | "limit": 1000, |
523 | "mode": "list", |
524 | "queryType": "table", |
525 | "table": "" |
526 | } |
527 | }, |
528 | "pluginVersion": "4.10.1", |
529 | "queryType": "table", |
530 | "rawSql": "SELECT $__timeInterval(ts) as \"time\", count(ts) FROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip like '%${IP}%'\n GROUP BY time", |
531 | "refId": "A" |
532 | } |
533 | ], |
534 | "title": "Requests Trend", |
535 | "type": "timeseries" |
536 | }, |
537 | { |
538 | "datasource": { |
539 | "type": "grafana-clickhouse-datasource", |
540 | "uid": "fet9b6miuomwwf" |
541 | }, |
542 | "fieldConfig": { |
543 | "defaults": { |
544 | "color": { |
545 | "mode": "thresholds" |
546 | }, |
547 | "mappings": [], |
548 | "max": 100, |
549 | "min": 0, |
550 | "thresholds": { |
551 | "mode": "absolute", |
552 | "steps": [ |
553 | { |
554 | "color": "green", |
555 | "value": null |
556 | }, |
557 | { |
558 | "color": "red", |
559 | "value": 30 |
560 | } |
561 | ] |
562 | }, |
563 | "unit": "ms" |
564 | }, |
565 | "overrides": [] |
566 | }, |
567 | "gridPos": { |
568 | "h": 2, |
569 | "w": 3, |
570 | "x": 12, |
571 | "y": 2 |
572 | }, |
573 | "id": 34, |
574 | "options": { |
575 | "displayMode": "lcd", |
576 | "maxVizHeight": 300, |
577 | "minVizHeight": 16, |
578 | "minVizWidth": 8, |
579 | "namePlacement": "auto", |
580 | "orientation": "horizontal", |
581 | "reduceOptions": { |
582 | "calcs": [ |
583 | "lastNotNull" |
584 | ], |
585 | "fields": "", |
586 | "values": false |
587 | }, |
588 | "showUnfilled": true, |
589 | "sizing": "auto", |
590 | "valueMode": "color" |
591 | }, |
592 | "pluginVersion": "11.1.3", |
593 | "targets": [ |
594 | { |
595 | "datasource": { |
596 | "type": "grafana-clickhouse-datasource", |
597 | "uid": "fet9b6miuomwwf" |
598 | }, |
599 | "editorType": "sql", |
600 | "format": 1, |
601 | "meta": { |
602 | "builderOptions": { |
603 | "columns": [], |
604 | "database": "", |
605 | "limit": 1000, |
606 | "mode": "list", |
607 | "queryType": "table", |
608 | "table": "" |
609 | } |
610 | }, |
611 | "pluginVersion": "4.10.1", |
612 | "queryType": "table", |
613 | "rawSql": "SELECT\n quantile(0.80)(duration_ms) AS current_p95_response_time_ms\nFROM logs.caddy_requests\nWHERE ts BETWEEN $__fromTime AND $__toTime\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n", |
614 | "refId": "A" |
615 | } |
616 | ], |
617 | "title": "P80 Latancy", |
618 | "type": "bargauge" |
619 | }, |
620 | { |
621 | "datasource": { |
622 | "type": "grafana-clickhouse-datasource", |
623 | "uid": "fet9b6miuomwwf" |
624 | }, |
625 | "fieldConfig": { |
626 | "defaults": { |
627 | "color": { |
628 | "mode": "thresholds" |
629 | }, |
630 | "mappings": [], |
631 | "max": 16, |
632 | "min": 0, |
633 | "thresholds": { |
634 | "mode": "absolute", |
635 | "steps": [ |
636 | { |
637 | "color": "green", |
638 | "value": null |
639 | }, |
640 | { |
641 | "color": "red", |
642 | "value": 5 |
643 | } |
644 | ] |
645 | }, |
646 | "unit": "ms" |
647 | }, |
648 | "overrides": [] |
649 | }, |
650 | "gridPos": { |
651 | "h": 2, |
652 | "w": 3, |
653 | "x": 12, |
654 | "y": 4 |
655 | }, |
656 | "id": 33, |
657 | "options": { |
658 | "displayMode": "lcd", |
659 | "maxVizHeight": 300, |
660 | "minVizHeight": 16, |
661 | "minVizWidth": 8, |
662 | "namePlacement": "auto", |
663 | "orientation": "horizontal", |
664 | "reduceOptions": { |
665 | "calcs": [ |
666 | "lastNotNull" |
667 | ], |
668 | "fields": "", |
669 | "values": false |
670 | }, |
671 | "showUnfilled": true, |
672 | "sizing": "auto", |
673 | "valueMode": "color" |
674 | }, |
675 | "pluginVersion": "11.1.3", |
676 | "targets": [ |
677 | { |
678 | "datasource": { |
679 | "type": "grafana-clickhouse-datasource", |
680 | "uid": "fet9b6miuomwwf" |
681 | }, |
682 | "editorType": "sql", |
683 | "format": 1, |
684 | "meta": { |
685 | "builderOptions": { |
686 | "columns": [], |
687 | "database": "", |
688 | "limit": 1000, |
689 | "mode": "list", |
690 | "queryType": "table", |
691 | "table": "" |
692 | } |
693 | }, |
694 | "pluginVersion": "4.10.1", |
695 | "queryType": "table", |
696 | "rawSql": "SELECT\n quantile(0.5)(duration_ms) AS current_median_response_time_ms\nFROM logs.caddy_requests\nWHERE ts BETWEEN $__fromTime AND $__toTime\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n", |
697 | "refId": "A" |
698 | } |
699 | ], |
700 | "title": "Middle Latancy", |
701 | "type": "bargauge" |
702 | }, |
703 | { |
704 | "datasource": { |
705 | "type": "grafana-clickhouse-datasource", |
706 | "uid": "fet9b6miuomwwf" |
707 | }, |
708 | "fieldConfig": { |
709 | "defaults": { |
710 | "color": { |
711 | "mode": "continuous-GrYlRd" |
712 | }, |
713 | "mappings": [], |
714 | "thresholds": { |
715 | "mode": "absolute", |
716 | "steps": [ |
717 | { |
718 | "color": "green", |
719 | "value": null |
720 | }, |
721 | { |
722 | "color": "red", |
723 | "value": 80 |
724 | } |
725 | ] |
726 | } |
727 | }, |
728 | "overrides": [] |
729 | }, |
730 | "gridPos": { |
731 | "h": 8, |
732 | "w": 5, |
733 | "x": 0, |
734 | "y": 6 |
735 | }, |
736 | "id": 5, |
737 | "options": { |
738 | "displayMode": "lcd", |
739 | "maxVizHeight": 300, |
740 | "minVizHeight": 16, |
741 | "minVizWidth": 8, |
742 | "namePlacement": "auto", |
743 | "orientation": "horizontal", |
744 | "reduceOptions": { |
745 | "calcs": [], |
746 | "fields": "/^requests$/", |
747 | "limit": 10, |
748 | "values": true |
749 | }, |
750 | "showUnfilled": true, |
751 | "sizing": "auto", |
752 | "valueMode": "color" |
753 | }, |
754 | "pluginVersion": "11.1.3", |
755 | "targets": [ |
756 | { |
757 | "datasource": { |
758 | "type": "grafana-clickhouse-datasource", |
759 | "uid": "fet9b6miuomwwf" |
760 | }, |
761 | "editorType": "sql", |
762 | "format": 1, |
763 | "meta": { |
764 | "builderOptions": { |
765 | "columns": [], |
766 | "database": "", |
767 | "limit": 1000, |
768 | "mode": "list", |
769 | "queryType": "table", |
770 | "table": "" |
771 | } |
772 | }, |
773 | "pluginVersion": "4.10.1", |
774 | "queryType": "table", |
775 | "rawSql": "SELECT\n host as Application,\n count() AS requests\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip like '%${IP}%'\nGROUP BY Application\nORDER BY requests DESC\n\n", |
776 | "refId": "A" |
777 | } |
778 | ], |
779 | "title": "Requests By Count", |
780 | "type": "bargauge" |
781 | }, |
782 | { |
783 | "datasource": { |
784 | "type": "grafana-clickhouse-datasource", |
785 | "uid": "fet9b6miuomwwf" |
786 | }, |
787 | "fieldConfig": { |
788 | "defaults": { |
789 | "color": { |
790 | "mode": "continuous-GrYlRd" |
791 | }, |
792 | "mappings": [], |
793 | "thresholds": { |
794 | "mode": "absolute", |
795 | "steps": [ |
796 | { |
797 | "color": "green", |
798 | "value": null |
799 | }, |
800 | { |
801 | "color": "red", |
802 | "value": 80 |
803 | } |
804 | ] |
805 | } |
806 | }, |
807 | "overrides": [] |
808 | }, |
809 | "gridPos": { |
810 | "h": 8, |
811 | "w": 5, |
812 | "x": 5, |
813 | "y": 6 |
814 | }, |
815 | "id": 6, |
816 | "options": { |
817 | "displayMode": "lcd", |
818 | "maxVizHeight": 300, |
819 | "minVizHeight": 16, |
820 | "minVizWidth": 8, |
821 | "namePlacement": "auto", |
822 | "orientation": "horizontal", |
823 | "reduceOptions": { |
824 | "calcs": [], |
825 | "fields": "", |
826 | "limit": 10, |
827 | "values": true |
828 | }, |
829 | "showUnfilled": true, |
830 | "sizing": "auto", |
831 | "valueMode": "color" |
832 | }, |
833 | "pluginVersion": "11.1.3", |
834 | "targets": [ |
835 | { |
836 | "datasource": { |
837 | "type": "grafana-clickhouse-datasource", |
838 | "uid": "fet9b6miuomwwf" |
839 | }, |
840 | "editorType": "sql", |
841 | "format": 1, |
842 | "meta": { |
843 | "builderOptions": { |
844 | "columns": [], |
845 | "database": "", |
846 | "limit": 1000, |
847 | "mode": "list", |
848 | "queryType": "table", |
849 | "table": "" |
850 | } |
851 | }, |
852 | "pluginVersion": "4.10.1", |
853 | "queryType": "table", |
854 | "rawSql": "SELECT\n host AS Application,\n uniqExact(remote_ip) AS unique_ip_count\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Application\nORDER BY unique_ip_count DESC\n\n", |
855 | "refId": "A" |
856 | } |
857 | ], |
858 | "title": "Requests By Unique IP Count (IPs)", |
859 | "type": "bargauge" |
860 | }, |
861 | { |
862 | "datasource": { |
863 | "type": "grafana-clickhouse-datasource", |
864 | "uid": "fet9b6miuomwwf" |
865 | }, |
866 | "fieldConfig": { |
867 | "defaults": { |
868 | "color": { |
869 | "mode": "continuous-GrYlRd" |
870 | }, |
871 | "mappings": [], |
872 | "thresholds": { |
873 | "mode": "absolute", |
874 | "steps": [ |
875 | { |
876 | "color": "green", |
877 | "value": null |
878 | }, |
879 | { |
880 | "color": "red", |
881 | "value": 80 |
882 | } |
883 | ] |
884 | }, |
885 | "unit": "s" |
886 | }, |
887 | "overrides": [] |
888 | }, |
889 | "gridPos": { |
890 | "h": 8, |
891 | "w": 5, |
892 | "x": 10, |
893 | "y": 6 |
894 | }, |
895 | "id": 7, |
896 | "options": { |
897 | "displayMode": "lcd", |
898 | "maxVizHeight": 300, |
899 | "minVizHeight": 16, |
900 | "minVizWidth": 8, |
901 | "namePlacement": "auto", |
902 | "orientation": "horizontal", |
903 | "reduceOptions": { |
904 | "calcs": [], |
905 | "fields": "", |
906 | "limit": 10, |
907 | "values": true |
908 | }, |
909 | "showUnfilled": true, |
910 | "sizing": "auto", |
911 | "valueMode": "color" |
912 | }, |
913 | "pluginVersion": "11.1.3", |
914 | "targets": [ |
915 | { |
916 | "datasource": { |
917 | "type": "grafana-clickhouse-datasource", |
918 | "uid": "fet9b6miuomwwf" |
919 | }, |
920 | "editorType": "sql", |
921 | "format": 1, |
922 | "meta": { |
923 | "builderOptions": { |
924 | "columns": [], |
925 | "database": "", |
926 | "limit": 1000, |
927 | "mode": "list", |
928 | "queryType": "table", |
929 | "table": "" |
930 | } |
931 | }, |
932 | "pluginVersion": "4.10.1", |
933 | "queryType": "table", |
934 | "rawSql": "SELECT\n host AS Application,\n sum(duration_ms)/1000 AS total_duration_seconds\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Application\nORDER BY total_duration_seconds DESC", |
935 | "refId": "A" |
936 | } |
937 | ], |
938 | "title": "Total Time costs (Seconds)", |
939 | "type": "bargauge" |
940 | }, |
941 | { |
942 | "datasource": { |
943 | "type": "grafana-clickhouse-datasource", |
944 | "uid": "fet9b6miuomwwf" |
945 | }, |
946 | "fieldConfig": { |
947 | "defaults": { |
948 | "color": { |
949 | "mode": "continuous-GrYlRd" |
950 | }, |
951 | "mappings": [], |
952 | "thresholds": { |
953 | "mode": "absolute", |
954 | "steps": [ |
955 | { |
956 | "color": "green", |
957 | "value": null |
958 | }, |
959 | { |
960 | "color": "red", |
961 | "value": 80 |
962 | } |
963 | ] |
964 | }, |
965 | "unit": "bytes" |
966 | }, |
967 | "overrides": [] |
968 | }, |
969 | "gridPos": { |
970 | "h": 8, |
971 | "w": 5, |
972 | "x": 15, |
973 | "y": 6 |
974 | }, |
975 | "id": 28, |
976 | "options": { |
977 | "displayMode": "lcd", |
978 | "maxVizHeight": 300, |
979 | "minVizHeight": 16, |
980 | "minVizWidth": 8, |
981 | "namePlacement": "auto", |
982 | "orientation": "horizontal", |
983 | "reduceOptions": { |
984 | "calcs": [], |
985 | "fields": "", |
986 | "limit": 10, |
987 | "values": true |
988 | }, |
989 | "showUnfilled": true, |
990 | "sizing": "auto", |
991 | "valueMode": "color" |
992 | }, |
993 | "pluginVersion": "11.1.3", |
994 | "targets": [ |
995 | { |
996 | "datasource": { |
997 | "type": "grafana-clickhouse-datasource", |
998 | "uid": "fet9b6miuomwwf" |
999 | }, |
1000 | "editorType": "sql", |
1001 | "format": 1, |
1002 | "meta": { |
1003 | "builderOptions": { |
1004 | "columns": [], |
1005 | "database": "", |
1006 | "limit": 1000, |
1007 | "mode": "list", |
1008 | "queryType": "table", |
1009 | "table": "" |
1010 | } |
1011 | }, |
1012 | "pluginVersion": "4.10.1", |
1013 | "queryType": "table", |
1014 | "rawSql": "SELECT\n host AS Application,\n sum(bytes_sent) AS total_duration_seconds\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Application\nORDER BY total_duration_seconds DESC", |
1015 | "refId": "A" |
1016 | } |
1017 | ], |
1018 | "title": "Total Bytes Sent (MB)", |
1019 | "type": "bargauge" |
1020 | }, |
1021 | { |
1022 | "datasource": { |
1023 | "type": "grafana-clickhouse-datasource", |
1024 | "uid": "fet9b6miuomwwf" |
1025 | }, |
1026 | "fieldConfig": { |
1027 | "defaults": { |
1028 | "color": { |
1029 | "mode": "continuous-GrYlRd" |
1030 | }, |
1031 | "mappings": [], |
1032 | "thresholds": { |
1033 | "mode": "absolute", |
1034 | "steps": [ |
1035 | { |
1036 | "color": "green", |
1037 | "value": null |
1038 | }, |
1039 | { |
1040 | "color": "red", |
1041 | "value": 80 |
1042 | } |
1043 | ] |
1044 | } |
1045 | }, |
1046 | "overrides": [] |
1047 | }, |
1048 | "gridPos": { |
1049 | "h": 8, |
1050 | "w": 4, |
1051 | "x": 20, |
1052 | "y": 6 |
1053 | }, |
1054 | "id": 9, |
1055 | "options": { |
1056 | "displayMode": "lcd", |
1057 | "maxVizHeight": 300, |
1058 | "minVizHeight": 16, |
1059 | "minVizWidth": 8, |
1060 | "namePlacement": "auto", |
1061 | "orientation": "horizontal", |
1062 | "reduceOptions": { |
1063 | "calcs": [], |
1064 | "fields": "", |
1065 | "limit": 10, |
1066 | "values": true |
1067 | }, |
1068 | "showUnfilled": true, |
1069 | "sizing": "auto", |
1070 | "valueMode": "color" |
1071 | }, |
1072 | "pluginVersion": "11.1.3", |
1073 | "targets": [ |
1074 | { |
1075 | "datasource": { |
1076 | "type": "grafana-clickhouse-datasource", |
1077 | "uid": "fet9b6miuomwwf" |
1078 | }, |
1079 | "editorType": "sql", |
1080 | "format": 1, |
1081 | "meta": { |
1082 | "builderOptions": { |
1083 | "columns": [], |
1084 | "database": "", |
1085 | "limit": 1000, |
1086 | "mode": "list", |
1087 | "queryType": "table", |
1088 | "table": "" |
1089 | } |
1090 | }, |
1091 | "pluginVersion": "4.10.1", |
1092 | "queryType": "table", |
1093 | "rawSql": "SELECT\n host AS Application,\n round(countIf(status >= 500) / count() * 100, 2) AS failure_rate_percent\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Application\nORDER BY failure_rate_percent DESC\n", |
1094 | "refId": "A" |
1095 | } |
1096 | ], |
1097 | "title": "500 Failure Rate%", |
1098 | "type": "bargauge" |
1099 | }, |
1100 | { |
1101 | "datasource": { |
1102 | "type": "grafana-clickhouse-datasource", |
1103 | "uid": "fet9b6miuomwwf" |
1104 | }, |
1105 | "fieldConfig": { |
1106 | "defaults": { |
1107 | "color": { |
1108 | "mode": "palette-classic" |
1109 | }, |
1110 | "custom": { |
1111 | "axisBorderShow": false, |
1112 | "axisCenteredZero": false, |
1113 | "axisColorMode": "text", |
1114 | "axisLabel": "", |
1115 | "axisPlacement": "auto", |
1116 | "barAlignment": 0, |
1117 | "drawStyle": "line", |
1118 | "fillOpacity": 0, |
1119 | "gradientMode": "none", |
1120 | "hideFrom": { |
1121 | "legend": false, |
1122 | "tooltip": false, |
1123 | "viz": false |
1124 | }, |
1125 | "insertNulls": false, |
1126 | "lineInterpolation": "linear", |
1127 | "lineWidth": 1, |
1128 | "pointSize": 5, |
1129 | "scaleDistribution": { |
1130 | "type": "linear" |
1131 | }, |
1132 | "showPoints": "auto", |
1133 | "spanNulls": false, |
1134 | "stacking": { |
1135 | "group": "A", |
1136 | "mode": "none" |
1137 | }, |
1138 | "thresholdsStyle": { |
1139 | "mode": "off" |
1140 | } |
1141 | }, |
1142 | "mappings": [], |
1143 | "thresholds": { |
1144 | "mode": "percentage", |
1145 | "steps": [ |
1146 | { |
1147 | "color": "green", |
1148 | "value": null |
1149 | }, |
1150 | { |
1151 | "color": "orange", |
1152 | "value": 70 |
1153 | }, |
1154 | { |
1155 | "color": "red", |
1156 | "value": 85 |
1157 | } |
1158 | ] |
1159 | }, |
1160 | "unit": "ms" |
1161 | }, |
1162 | "overrides": [] |
1163 | }, |
1164 | "gridPos": { |
1165 | "h": 6, |
1166 | "w": 5, |
1167 | "x": 0, |
1168 | "y": 14 |
1169 | }, |
1170 | "id": 3, |
1171 | "options": { |
1172 | "legend": { |
1173 | "calcs": [], |
1174 | "displayMode": "list", |
1175 | "placement": "bottom", |
1176 | "showLegend": false |
1177 | }, |
1178 | "tooltip": { |
1179 | "mode": "single", |
1180 | "sort": "none" |
1181 | } |
1182 | }, |
1183 | "pluginVersion": "11.1.3", |
1184 | "targets": [ |
1185 | { |
1186 | "datasource": { |
1187 | "type": "grafana-clickhouse-datasource", |
1188 | "uid": "fet9b6miuomwwf" |
1189 | }, |
1190 | "editorType": "sql", |
1191 | "format": 1, |
1192 | "meta": { |
1193 | "builderOptions": { |
1194 | "columns": [], |
1195 | "database": "", |
1196 | "limit": 1000, |
1197 | "mode": "list", |
1198 | "queryType": "table", |
1199 | "table": "" |
1200 | } |
1201 | }, |
1202 | "pluginVersion": "4.10.1", |
1203 | "queryType": "table", |
1204 | "rawSql": "SELECT\n $__timeInterval(ts) AS \"time\",\n quantile(0.95)(duration_ms) AS p95_response_time_ms\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND status != '101'\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY time\nORDER BY time", |
1205 | "refId": "A" |
1206 | } |
1207 | ], |
1208 | "title": "Requests Latancy P95", |
1209 | "type": "timeseries" |
1210 | }, |
1211 | { |
1212 | "datasource": { |
1213 | "type": "grafana-clickhouse-datasource", |
1214 | "uid": "fet9b6miuomwwf" |
1215 | }, |
1216 | "fieldConfig": { |
1217 | "defaults": { |
1218 | "color": { |
1219 | "mode": "palette-classic" |
1220 | }, |
1221 | "custom": { |
1222 | "axisBorderShow": false, |
1223 | "axisCenteredZero": false, |
1224 | "axisColorMode": "text", |
1225 | "axisLabel": "", |
1226 | "axisPlacement": "auto", |
1227 | "barAlignment": 0, |
1228 | "drawStyle": "line", |
1229 | "fillOpacity": 0, |
1230 | "gradientMode": "none", |
1231 | "hideFrom": { |
1232 | "legend": false, |
1233 | "tooltip": false, |
1234 | "viz": false |
1235 | }, |
1236 | "insertNulls": false, |
1237 | "lineInterpolation": "linear", |
1238 | "lineWidth": 1, |
1239 | "pointSize": 5, |
1240 | "scaleDistribution": { |
1241 | "type": "linear" |
1242 | }, |
1243 | "showPoints": "auto", |
1244 | "spanNulls": false, |
1245 | "stacking": { |
1246 | "group": "A", |
1247 | "mode": "none" |
1248 | }, |
1249 | "thresholdsStyle": { |
1250 | "mode": "off" |
1251 | } |
1252 | }, |
1253 | "mappings": [], |
1254 | "thresholds": { |
1255 | "mode": "absolute", |
1256 | "steps": [ |
1257 | { |
1258 | "color": "green", |
1259 | "value": null |
1260 | }, |
1261 | { |
1262 | "color": "red", |
1263 | "value": 80 |
1264 | } |
1265 | ] |
1266 | } |
1267 | }, |
1268 | "overrides": [] |
1269 | }, |
1270 | "gridPos": { |
1271 | "h": 6, |
1272 | "w": 5, |
1273 | "x": 5, |
1274 | "y": 14 |
1275 | }, |
1276 | "id": 10, |
1277 | "options": { |
1278 | "legend": { |
1279 | "calcs": [], |
1280 | "displayMode": "table", |
1281 | "placement": "bottom", |
1282 | "showLegend": false |
1283 | }, |
1284 | "tooltip": { |
1285 | "mode": "single", |
1286 | "sort": "none" |
1287 | } |
1288 | }, |
1289 | "targets": [ |
1290 | { |
1291 | "datasource": { |
1292 | "type": "grafana-clickhouse-datasource", |
1293 | "uid": "fet9b6miuomwwf" |
1294 | }, |
1295 | "editorType": "sql", |
1296 | "format": 1, |
1297 | "meta": { |
1298 | "builderOptions": { |
1299 | "columns": [], |
1300 | "database": "", |
1301 | "limit": 1000, |
1302 | "mode": "list", |
1303 | "queryType": "table", |
1304 | "table": "" |
1305 | } |
1306 | }, |
1307 | "pluginVersion": "4.10.1", |
1308 | "queryType": "table", |
1309 | "rawSql": "SELECT\n $__timeInterval(ts) AS \"time\",\n uniqExact(remote_ip) AS unique_ip_count\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY time\nORDER BY time;", |
1310 | "refId": "A" |
1311 | } |
1312 | ], |
1313 | "title": "Incoming Unique IPs Count", |
1314 | "type": "timeseries" |
1315 | }, |
1316 | { |
1317 | "datasource": { |
1318 | "type": "grafana-clickhouse-datasource", |
1319 | "uid": "fet9b6miuomwwf" |
1320 | }, |
1321 | "fieldConfig": { |
1322 | "defaults": { |
1323 | "color": { |
1324 | "mode": "palette-classic" |
1325 | }, |
1326 | "custom": { |
1327 | "axisBorderShow": false, |
1328 | "axisCenteredZero": false, |
1329 | "axisColorMode": "text", |
1330 | "axisLabel": "", |
1331 | "axisPlacement": "auto", |
1332 | "barAlignment": 0, |
1333 | "drawStyle": "points", |
1334 | "fillOpacity": 0, |
1335 | "gradientMode": "none", |
1336 | "hideFrom": { |
1337 | "legend": false, |
1338 | "tooltip": false, |
1339 | "viz": false |
1340 | }, |
1341 | "insertNulls": false, |
1342 | "lineInterpolation": "linear", |
1343 | "lineWidth": 1, |
1344 | "pointSize": 3, |
1345 | "scaleDistribution": { |
1346 | "type": "linear" |
1347 | }, |
1348 | "showPoints": "auto", |
1349 | "spanNulls": false, |
1350 | "stacking": { |
1351 | "group": "A", |
1352 | "mode": "none" |
1353 | }, |
1354 | "thresholdsStyle": { |
1355 | "mode": "off" |
1356 | } |
1357 | }, |
1358 | "mappings": [], |
1359 | "thresholds": { |
1360 | "mode": "absolute", |
1361 | "steps": [ |
1362 | { |
1363 | "color": "green", |
1364 | "value": null |
1365 | }, |
1366 | { |
1367 | "color": "red", |
1368 | "value": 80 |
1369 | } |
1370 | ] |
1371 | }, |
1372 | "unit": "ms" |
1373 | }, |
1374 | "overrides": [] |
1375 | }, |
1376 | "gridPos": { |
1377 | "h": 6, |
1378 | "w": 5, |
1379 | "x": 10, |
1380 | "y": 14 |
1381 | }, |
1382 | "id": 11, |
1383 | "options": { |
1384 | "legend": { |
1385 | "calcs": [], |
1386 | "displayMode": "table", |
1387 | "placement": "bottom", |
1388 | "showLegend": false |
1389 | }, |
1390 | "tooltip": { |
1391 | "mode": "single", |
1392 | "sort": "none" |
1393 | } |
1394 | }, |
1395 | "targets": [ |
1396 | { |
1397 | "datasource": { |
1398 | "type": "grafana-clickhouse-datasource", |
1399 | "uid": "fet9b6miuomwwf" |
1400 | }, |
1401 | "editorType": "sql", |
1402 | "format": 1, |
1403 | "meta": { |
1404 | "builderOptions": { |
1405 | "columns": [], |
1406 | "database": "", |
1407 | "limit": 1000, |
1408 | "mode": "list", |
1409 | "queryType": "table", |
1410 | "table": "" |
1411 | } |
1412 | }, |
1413 | "pluginVersion": "4.10.1", |
1414 | "queryType": "table", |
1415 | "rawSql": "SELECT\n $__timeInterval(ts) AS \"time\",\n sum(duration_ms) AS total_duration_ms\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY time\nORDER BY time;", |
1416 | "refId": "A" |
1417 | } |
1418 | ], |
1419 | "title": "Processing Requests Total Time Costs", |
1420 | "type": "timeseries" |
1421 | }, |
1422 | { |
1423 | "datasource": { |
1424 | "type": "grafana-clickhouse-datasource", |
1425 | "uid": "fet9b6miuomwwf" |
1426 | }, |
1427 | "fieldConfig": { |
1428 | "defaults": { |
1429 | "color": { |
1430 | "mode": "palette-classic" |
1431 | }, |
1432 | "custom": { |
1433 | "axisBorderShow": false, |
1434 | "axisCenteredZero": false, |
1435 | "axisColorMode": "text", |
1436 | "axisLabel": "", |
1437 | "axisPlacement": "auto", |
1438 | "barAlignment": 0, |
1439 | "drawStyle": "line", |
1440 | "fillOpacity": 0, |
1441 | "gradientMode": "none", |
1442 | "hideFrom": { |
1443 | "legend": false, |
1444 | "tooltip": false, |
1445 | "viz": false |
1446 | }, |
1447 | "insertNulls": false, |
1448 | "lineInterpolation": "linear", |
1449 | "lineWidth": 1, |
1450 | "pointSize": 5, |
1451 | "scaleDistribution": { |
1452 | "type": "linear" |
1453 | }, |
1454 | "showPoints": "auto", |
1455 | "spanNulls": false, |
1456 | "stacking": { |
1457 | "group": "A", |
1458 | "mode": "none" |
1459 | }, |
1460 | "thresholdsStyle": { |
1461 | "mode": "off" |
1462 | } |
1463 | }, |
1464 | "mappings": [], |
1465 | "thresholds": { |
1466 | "mode": "absolute", |
1467 | "steps": [ |
1468 | { |
1469 | "color": "green", |
1470 | "value": null |
1471 | }, |
1472 | { |
1473 | "color": "red", |
1474 | "value": 80 |
1475 | } |
1476 | ] |
1477 | }, |
1478 | "unit": "binBps" |
1479 | }, |
1480 | "overrides": [] |
1481 | }, |
1482 | "gridPos": { |
1483 | "h": 6, |
1484 | "w": 5, |
1485 | "x": 15, |
1486 | "y": 14 |
1487 | }, |
1488 | "id": 12, |
1489 | "options": { |
1490 | "legend": { |
1491 | "calcs": [], |
1492 | "displayMode": "table", |
1493 | "placement": "bottom", |
1494 | "showLegend": false |
1495 | }, |
1496 | "tooltip": { |
1497 | "mode": "single", |
1498 | "sort": "none" |
1499 | } |
1500 | }, |
1501 | "targets": [ |
1502 | { |
1503 | "datasource": { |
1504 | "type": "grafana-clickhouse-datasource", |
1505 | "uid": "fet9b6miuomwwf" |
1506 | }, |
1507 | "editorType": "sql", |
1508 | "format": 1, |
1509 | "meta": { |
1510 | "builderOptions": { |
1511 | "columns": [], |
1512 | "database": "", |
1513 | "limit": 1000, |
1514 | "mode": "list", |
1515 | "queryType": "table", |
1516 | "table": "" |
1517 | } |
1518 | }, |
1519 | "pluginVersion": "4.10.1", |
1520 | "queryType": "table", |
1521 | "rawSql": "SELECT\n $__timeInterval(ts) AS time,\n sum(bytes_sent) / $__interval_s AS bytes_per_second\nFROM logs.caddy_requests\nWHERE\n $__timeFilter(ts)\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY\n time\nORDER BY\n time ASC", |
1522 | "refId": "A" |
1523 | } |
1524 | ], |
1525 | "title": "Upload Bandwidth", |
1526 | "type": "timeseries" |
1527 | }, |
1528 | { |
1529 | "datasource": { |
1530 | "type": "grafana-clickhouse-datasource", |
1531 | "uid": "fet9b6miuomwwf" |
1532 | }, |
1533 | "fieldConfig": { |
1534 | "defaults": { |
1535 | "color": { |
1536 | "fixedColor": "dark-red", |
1537 | "mode": "fixed" |
1538 | }, |
1539 | "custom": { |
1540 | "axisBorderShow": false, |
1541 | "axisCenteredZero": false, |
1542 | "axisColorMode": "series", |
1543 | "axisLabel": "", |
1544 | "axisPlacement": "auto", |
1545 | "barAlignment": 0, |
1546 | "drawStyle": "points", |
1547 | "fillOpacity": 0, |
1548 | "gradientMode": "none", |
1549 | "hideFrom": { |
1550 | "legend": false, |
1551 | "tooltip": false, |
1552 | "viz": false |
1553 | }, |
1554 | "insertNulls": false, |
1555 | "lineInterpolation": "linear", |
1556 | "lineWidth": 1, |
1557 | "pointSize": 2, |
1558 | "scaleDistribution": { |
1559 | "type": "linear" |
1560 | }, |
1561 | "showPoints": "auto", |
1562 | "spanNulls": false, |
1563 | "stacking": { |
1564 | "group": "A", |
1565 | "mode": "none" |
1566 | }, |
1567 | "thresholdsStyle": { |
1568 | "mode": "off" |
1569 | } |
1570 | }, |
1571 | "mappings": [], |
1572 | "thresholds": { |
1573 | "mode": "absolute", |
1574 | "steps": [ |
1575 | { |
1576 | "color": "green", |
1577 | "value": null |
1578 | }, |
1579 | { |
1580 | "color": "red", |
1581 | "value": 80 |
1582 | } |
1583 | ] |
1584 | } |
1585 | }, |
1586 | "overrides": [] |
1587 | }, |
1588 | "gridPos": { |
1589 | "h": 6, |
1590 | "w": 4, |
1591 | "x": 20, |
1592 | "y": 14 |
1593 | }, |
1594 | "id": 13, |
1595 | "options": { |
1596 | "legend": { |
1597 | "calcs": [], |
1598 | "displayMode": "table", |
1599 | "placement": "bottom", |
1600 | "showLegend": false |
1601 | }, |
1602 | "tooltip": { |
1603 | "mode": "single", |
1604 | "sort": "none" |
1605 | } |
1606 | }, |
1607 | "targets": [ |
1608 | { |
1609 | "datasource": { |
1610 | "type": "grafana-clickhouse-datasource", |
1611 | "uid": "fet9b6miuomwwf" |
1612 | }, |
1613 | "editorType": "sql", |
1614 | "format": 1, |
1615 | "meta": { |
1616 | "builderOptions": { |
1617 | "columns": [], |
1618 | "database": "", |
1619 | "limit": 1000, |
1620 | "mode": "list", |
1621 | "queryType": "table", |
1622 | "table": "" |
1623 | } |
1624 | }, |
1625 | "pluginVersion": "4.10.1", |
1626 | "queryType": "table", |
1627 | "rawSql": "SELECT\n $__timeInterval(ts) AS \"time\",\n countIf(status >= 500) AS failure_count\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY time\nORDER BY time;", |
1628 | "refId": "A" |
1629 | } |
1630 | ], |
1631 | "title": "Requests 500 Count", |
1632 | "type": "timeseries" |
1633 | }, |
1634 | { |
1635 | "datasource": { |
1636 | "type": "grafana-clickhouse-datasource", |
1637 | "uid": "fet9b6miuomwwf" |
1638 | }, |
1639 | "fieldConfig": { |
1640 | "defaults": { |
1641 | "color": { |
1642 | "mode": "continuous-BlYlRd" |
1643 | }, |
1644 | "mappings": [], |
1645 | "thresholds": { |
1646 | "mode": "absolute", |
1647 | "steps": [ |
1648 | { |
1649 | "color": "green", |
1650 | "value": null |
1651 | }, |
1652 | { |
1653 | "color": "red", |
1654 | "value": 80 |
1655 | } |
1656 | ] |
1657 | }, |
1658 | "unit": "short" |
1659 | }, |
1660 | "overrides": [] |
1661 | }, |
1662 | "gridPos": { |
1663 | "h": 8, |
1664 | "w": 9, |
1665 | "x": 0, |
1666 | "y": 20 |
1667 | }, |
1668 | "id": 15, |
1669 | "options": { |
1670 | "displayMode": "gradient", |
1671 | "maxVizHeight": 300, |
1672 | "minVizHeight": 16, |
1673 | "minVizWidth": 8, |
1674 | "namePlacement": "auto", |
1675 | "orientation": "horizontal", |
1676 | "reduceOptions": { |
1677 | "calcs": [ |
1678 | "lastNotNull" |
1679 | ], |
1680 | "fields": "/^requests$/", |
1681 | "limit": 25, |
1682 | "values": true |
1683 | }, |
1684 | "showUnfilled": false, |
1685 | "sizing": "auto", |
1686 | "valueMode": "color" |
1687 | }, |
1688 | "pluginVersion": "11.1.3", |
1689 | "targets": [ |
1690 | { |
1691 | "datasource": { |
1692 | "type": "grafana-clickhouse-datasource", |
1693 | "uid": "fet9b6miuomwwf" |
1694 | }, |
1695 | "editorType": "sql", |
1696 | "format": 1, |
1697 | "meta": { |
1698 | "builderOptions": { |
1699 | "columns": [], |
1700 | "database": "", |
1701 | "limit": 1000, |
1702 | "mode": "list", |
1703 | "queryType": "table", |
1704 | "table": "" |
1705 | } |
1706 | }, |
1707 | "pluginVersion": "4.10.1", |
1708 | "queryType": "table", |
1709 | "rawSql": "SELECT\n concat(host, splitByChar('?', uri)[1]) AS Path,\n count() AS requests\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Path\nORDER BY requests DESC\n", |
1710 | "refId": "A" |
1711 | } |
1712 | ], |
1713 | "title": "Hot Interfaces", |
1714 | "type": "bargauge" |
1715 | }, |
1716 | { |
1717 | "datasource": { |
1718 | "type": "grafana-clickhouse-datasource", |
1719 | "uid": "fet9b6miuomwwf" |
1720 | }, |
1721 | "fieldConfig": { |
1722 | "defaults": { |
1723 | "color": { |
1724 | "mode": "continuous-GrYlRd" |
1725 | }, |
1726 | "mappings": [], |
1727 | "thresholds": { |
1728 | "mode": "absolute", |
1729 | "steps": [ |
1730 | { |
1731 | "color": "green", |
1732 | "value": null |
1733 | }, |
1734 | { |
1735 | "color": "red", |
1736 | "value": 80 |
1737 | } |
1738 | ] |
1739 | }, |
1740 | "unit": "ms" |
1741 | }, |
1742 | "overrides": [] |
1743 | }, |
1744 | "gridPos": { |
1745 | "h": 8, |
1746 | "w": 9, |
1747 | "x": 9, |
1748 | "y": 20 |
1749 | }, |
1750 | "id": 18, |
1751 | "options": { |
1752 | "displayMode": "gradient", |
1753 | "maxVizHeight": 300, |
1754 | "minVizHeight": 16, |
1755 | "minVizWidth": 8, |
1756 | "namePlacement": "auto", |
1757 | "orientation": "horizontal", |
1758 | "reduceOptions": { |
1759 | "calcs": [ |
1760 | "lastNotNull" |
1761 | ], |
1762 | "fields": "/^avg_response_time_ms$/", |
1763 | "limit": 25, |
1764 | "values": true |
1765 | }, |
1766 | "showUnfilled": false, |
1767 | "sizing": "auto", |
1768 | "valueMode": "color" |
1769 | }, |
1770 | "pluginVersion": "11.1.3", |
1771 | "targets": [ |
1772 | { |
1773 | "datasource": { |
1774 | "type": "grafana-clickhouse-datasource", |
1775 | "uid": "fet9b6miuomwwf" |
1776 | }, |
1777 | "editorType": "sql", |
1778 | "format": 1, |
1779 | "meta": { |
1780 | "builderOptions": { |
1781 | "columns": [], |
1782 | "database": "", |
1783 | "limit": 1000, |
1784 | "mode": "list", |
1785 | "queryType": "table", |
1786 | "table": "" |
1787 | } |
1788 | }, |
1789 | "pluginVersion": "4.10.1", |
1790 | "queryType": "table", |
1791 | "rawSql": "SELECT\n concat(host, splitByChar('?', uri)[1]) AS Path,\n avg(duration_ms) AS avg_response_time_ms\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n AND status != '101'\nGROUP BY Path\nORDER BY avg_response_time_ms DESC\n", |
1792 | "refId": "A" |
1793 | } |
1794 | ], |
1795 | "title": "Slow Interface", |
1796 | "type": "bargauge" |
1797 | }, |
1798 | { |
1799 | "datasource": { |
1800 | "type": "grafana-clickhouse-datasource", |
1801 | "uid": "fet9b6miuomwwf" |
1802 | }, |
1803 | "fieldConfig": { |
1804 | "defaults": { |
1805 | "color": { |
1806 | "mode": "continuous-GrYlRd" |
1807 | }, |
1808 | "mappings": [], |
1809 | "thresholds": { |
1810 | "mode": "absolute", |
1811 | "steps": [ |
1812 | { |
1813 | "color": "green", |
1814 | "value": null |
1815 | }, |
1816 | { |
1817 | "color": "red", |
1818 | "value": 80 |
1819 | } |
1820 | ] |
1821 | }, |
1822 | "unit": "short" |
1823 | }, |
1824 | "overrides": [] |
1825 | }, |
1826 | "gridPos": { |
1827 | "h": 8, |
1828 | "w": 6, |
1829 | "x": 18, |
1830 | "y": 20 |
1831 | }, |
1832 | "id": 14, |
1833 | "options": { |
1834 | "displayMode": "gradient", |
1835 | "maxVizHeight": 300, |
1836 | "minVizHeight": 16, |
1837 | "minVizWidth": 8, |
1838 | "namePlacement": "auto", |
1839 | "orientation": "horizontal", |
1840 | "reduceOptions": { |
1841 | "calcs": [ |
1842 | "lastNotNull" |
1843 | ], |
1844 | "fields": "/^count$/", |
1845 | "limit": 20, |
1846 | "values": true |
1847 | }, |
1848 | "showUnfilled": false, |
1849 | "sizing": "auto", |
1850 | "valueMode": "color" |
1851 | }, |
1852 | "pluginVersion": "11.1.3", |
1853 | "targets": [ |
1854 | { |
1855 | "datasource": { |
1856 | "type": "grafana-clickhouse-datasource", |
1857 | "uid": "fet9b6miuomwwf" |
1858 | }, |
1859 | "editorType": "sql", |
1860 | "format": 1, |
1861 | "meta": { |
1862 | "builderOptions": { |
1863 | "columns": [], |
1864 | "database": "", |
1865 | "limit": 1000, |
1866 | "mode": "list", |
1867 | "queryType": "table", |
1868 | "table": "" |
1869 | } |
1870 | }, |
1871 | "pluginVersion": "4.10.1", |
1872 | "queryType": "table", |
1873 | "rawSql": "SELECT remote_ip, COUNT(*) AS count\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY remote_ip\nORDER BY count DESC;", |
1874 | "refId": "A" |
1875 | } |
1876 | ], |
1877 | "title": "Incoming IPs", |
1878 | "type": "bargauge" |
1879 | }, |
1880 | { |
1881 | "datasource": { |
1882 | "type": "grafana-clickhouse-datasource", |
1883 | "uid": "fet9b6miuomwwf" |
1884 | }, |
1885 | "fieldConfig": { |
1886 | "defaults": { |
1887 | "color": { |
1888 | "mode": "continuous-GrYlRd" |
1889 | }, |
1890 | "mappings": [], |
1891 | "thresholds": { |
1892 | "mode": "absolute", |
1893 | "steps": [ |
1894 | { |
1895 | "color": "green", |
1896 | "value": null |
1897 | }, |
1898 | { |
1899 | "color": "red", |
1900 | "value": 80 |
1901 | } |
1902 | ] |
1903 | }, |
1904 | "unit": "short" |
1905 | }, |
1906 | "overrides": [] |
1907 | }, |
1908 | "gridPos": { |
1909 | "h": 8, |
1910 | "w": 9, |
1911 | "x": 0, |
1912 | "y": 28 |
1913 | }, |
1914 | "id": 16, |
1915 | "options": { |
1916 | "displayMode": "gradient", |
1917 | "maxVizHeight": 300, |
1918 | "minVizHeight": 16, |
1919 | "minVizWidth": 8, |
1920 | "namePlacement": "auto", |
1921 | "orientation": "horizontal", |
1922 | "reduceOptions": { |
1923 | "calcs": [ |
1924 | "lastNotNull" |
1925 | ], |
1926 | "fields": "/^requests$/", |
1927 | "limit": 25, |
1928 | "values": true |
1929 | }, |
1930 | "showUnfilled": false, |
1931 | "sizing": "auto", |
1932 | "valueMode": "color" |
1933 | }, |
1934 | "pluginVersion": "11.1.3", |
1935 | "targets": [ |
1936 | { |
1937 | "datasource": { |
1938 | "type": "grafana-clickhouse-datasource", |
1939 | "uid": "fet9b6miuomwwf" |
1940 | }, |
1941 | "editorType": "sql", |
1942 | "format": 1, |
1943 | "meta": { |
1944 | "builderOptions": { |
1945 | "columns": [], |
1946 | "database": "", |
1947 | "limit": 1000, |
1948 | "mode": "list", |
1949 | "queryType": "table", |
1950 | "table": "" |
1951 | } |
1952 | }, |
1953 | "pluginVersion": "4.10.1", |
1954 | "queryType": "table", |
1955 | "rawSql": "SELECT\n concat(host, splitByChar('?', uri)[1]) AS Path,\n count() AS requests\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\n AND status >= 500\nGROUP BY Path\nORDER BY requests DESC\n", |
1956 | "refId": "A" |
1957 | } |
1958 | ], |
1959 | "title": "Error Interface", |
1960 | "type": "bargauge" |
1961 | }, |
1962 | { |
1963 | "datasource": { |
1964 | "type": "grafana-clickhouse-datasource", |
1965 | "uid": "fet9b6miuomwwf" |
1966 | }, |
1967 | "fieldConfig": { |
1968 | "defaults": { |
1969 | "color": { |
1970 | "mode": "continuous-GrYlRd" |
1971 | }, |
1972 | "mappings": [], |
1973 | "thresholds": { |
1974 | "mode": "absolute", |
1975 | "steps": [ |
1976 | { |
1977 | "color": "green", |
1978 | "value": null |
1979 | }, |
1980 | { |
1981 | "color": "red", |
1982 | "value": 80 |
1983 | } |
1984 | ] |
1985 | }, |
1986 | "unit": "percent" |
1987 | }, |
1988 | "overrides": [] |
1989 | }, |
1990 | "gridPos": { |
1991 | "h": 8, |
1992 | "w": 9, |
1993 | "x": 9, |
1994 | "y": 28 |
1995 | }, |
1996 | "id": 17, |
1997 | "options": { |
1998 | "displayMode": "basic", |
1999 | "maxVizHeight": 300, |
2000 | "minVizHeight": 16, |
2001 | "minVizWidth": 8, |
2002 | "namePlacement": "auto", |
2003 | "orientation": "horizontal", |
2004 | "reduceOptions": { |
2005 | "calcs": [ |
2006 | "lastNotNull" |
2007 | ], |
2008 | "fields": "/^failure_rate_percent$/", |
2009 | "limit": 25, |
2010 | "values": true |
2011 | }, |
2012 | "showUnfilled": false, |
2013 | "sizing": "auto", |
2014 | "valueMode": "color" |
2015 | }, |
2016 | "pluginVersion": "11.1.3", |
2017 | "targets": [ |
2018 | { |
2019 | "datasource": { |
2020 | "type": "grafana-clickhouse-datasource", |
2021 | "uid": "fet9b6miuomwwf" |
2022 | }, |
2023 | "editorType": "sql", |
2024 | "format": 1, |
2025 | "meta": { |
2026 | "builderOptions": { |
2027 | "columns": [], |
2028 | "database": "", |
2029 | "limit": 1000, |
2030 | "mode": "list", |
2031 | "queryType": "table", |
2032 | "table": "" |
2033 | } |
2034 | }, |
2035 | "pluginVersion": "4.10.1", |
2036 | "queryType": "table", |
2037 | "rawSql": "SELECT\n concat(host, splitByChar('?', uri)[1]) AS Path,\n round(countIf(status >= 500) / count() * 100, 2) AS failure_rate_percent\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY Path\nORDER BY failure_rate_percent DESC\n", |
2038 | "refId": "A" |
2039 | } |
2040 | ], |
2041 | "title": "Error Rate Interface", |
2042 | "type": "bargauge" |
2043 | }, |
2044 | { |
2045 | "datasource": { |
2046 | "type": "grafana-clickhouse-datasource", |
2047 | "uid": "fet9b6miuomwwf" |
2048 | }, |
2049 | "fieldConfig": { |
2050 | "defaults": { |
2051 | "color": { |
2052 | "mode": "continuous-GrYlRd" |
2053 | }, |
2054 | "mappings": [], |
2055 | "thresholds": { |
2056 | "mode": "absolute", |
2057 | "steps": [ |
2058 | { |
2059 | "color": "green", |
2060 | "value": null |
2061 | }, |
2062 | { |
2063 | "color": "red", |
2064 | "value": 80 |
2065 | } |
2066 | ] |
2067 | }, |
2068 | "unit": "bytes" |
2069 | }, |
2070 | "overrides": [] |
2071 | }, |
2072 | "gridPos": { |
2073 | "h": 8, |
2074 | "w": 6, |
2075 | "x": 18, |
2076 | "y": 28 |
2077 | }, |
2078 | "id": 32, |
2079 | "options": { |
2080 | "displayMode": "gradient", |
2081 | "maxVizHeight": 300, |
2082 | "minVizHeight": 16, |
2083 | "minVizWidth": 8, |
2084 | "namePlacement": "auto", |
2085 | "orientation": "horizontal", |
2086 | "reduceOptions": { |
2087 | "calcs": [ |
2088 | "lastNotNull" |
2089 | ], |
2090 | "fields": "/^total_bytes_sent$/", |
2091 | "limit": 20, |
2092 | "values": true |
2093 | }, |
2094 | "showUnfilled": false, |
2095 | "sizing": "auto", |
2096 | "valueMode": "color" |
2097 | }, |
2098 | "pluginVersion": "11.1.3", |
2099 | "targets": [ |
2100 | { |
2101 | "datasource": { |
2102 | "type": "grafana-clickhouse-datasource", |
2103 | "uid": "fet9b6miuomwwf" |
2104 | }, |
2105 | "editorType": "sql", |
2106 | "format": 1, |
2107 | "meta": { |
2108 | "builderOptions": { |
2109 | "columns": [], |
2110 | "database": "", |
2111 | "limit": 1000, |
2112 | "mode": "list", |
2113 | "queryType": "table", |
2114 | "table": "" |
2115 | } |
2116 | }, |
2117 | "pluginVersion": "4.10.1", |
2118 | "queryType": "table", |
2119 | "rawSql": "SELECT\n remote_ip,\n sum(bytes_sent) AS total_bytes_sent\nFROM \"logs\".\"caddy_requests\"\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nGROUP BY remote_ip\nORDER BY total_bytes_sent DESC;\n", |
2120 | "refId": "A" |
2121 | } |
2122 | ], |
2123 | "title": "Sent data to IPs", |
2124 | "type": "bargauge" |
2125 | }, |
2126 | { |
2127 | "datasource": { |
2128 | "type": "grafana-clickhouse-datasource", |
2129 | "uid": "fet9b6miuomwwf" |
2130 | }, |
2131 | "fieldConfig": { |
2132 | "defaults": { |
2133 | "color": { |
2134 | "mode": "thresholds" |
2135 | }, |
2136 | "custom": { |
2137 | "align": "auto", |
2138 | "cellOptions": { |
2139 | "type": "auto" |
2140 | }, |
2141 | "inspect": false |
2142 | }, |
2143 | "mappings": [], |
2144 | "thresholds": { |
2145 | "mode": "absolute", |
2146 | "steps": [ |
2147 | { |
2148 | "color": "green", |
2149 | "value": null |
2150 | }, |
2151 | { |
2152 | "color": "red", |
2153 | "value": 80 |
2154 | } |
2155 | ] |
2156 | } |
2157 | }, |
2158 | "overrides": [] |
2159 | }, |
2160 | "gridPos": { |
2161 | "h": 9, |
2162 | "w": 24, |
2163 | "x": 0, |
2164 | "y": 36 |
2165 | }, |
2166 | "id": 1, |
2167 | "options": { |
2168 | "cellHeight": "sm", |
2169 | "footer": { |
2170 | "countRows": false, |
2171 | "fields": "", |
2172 | "reducer": [ |
2173 | "sum" |
2174 | ], |
2175 | "show": false |
2176 | }, |
2177 | "showHeader": true, |
2178 | "sortBy": [ |
2179 | { |
2180 | "desc": false, |
2181 | "displayName": "status" |
2182 | } |
2183 | ] |
2184 | }, |
2185 | "pluginVersion": "11.1.3", |
2186 | "targets": [ |
2187 | { |
2188 | "builderOptions": { |
2189 | "aggregates": [], |
2190 | "columns": [ |
2191 | { |
2192 | "alias": "level", |
2193 | "custom": false, |
2194 | "name": "level", |
2195 | "type": "LowCardinality(String)" |
2196 | }, |
2197 | { |
2198 | "alias": "remote_ip", |
2199 | "custom": false, |
2200 | "name": "remote_ip", |
2201 | "type": "String" |
2202 | } |
2203 | ], |
2204 | "database": "logs", |
2205 | "filters": [], |
2206 | "groupBy": [], |
2207 | "limit": 1000, |
2208 | "meta": {}, |
2209 | "mode": "list", |
2210 | "orderBy": [], |
2211 | "queryType": "table", |
2212 | "table": "caddy_requests" |
2213 | }, |
2214 | "datasource": { |
2215 | "type": "grafana-clickhouse-datasource", |
2216 | "uid": "fet9b6miuomwwf" |
2217 | }, |
2218 | "editorType": "sql", |
2219 | "format": 1, |
2220 | "meta": { |
2221 | "builderOptions": { |
2222 | "aggregates": [], |
2223 | "columns": [ |
2224 | { |
2225 | "alias": "level", |
2226 | "custom": false, |
2227 | "name": "level", |
2228 | "type": "LowCardinality(String)" |
2229 | }, |
2230 | { |
2231 | "alias": "remote_ip", |
2232 | "custom": false, |
2233 | "name": "remote_ip", |
2234 | "type": "String" |
2235 | } |
2236 | ], |
2237 | "database": "logs", |
2238 | "filters": [], |
2239 | "groupBy": [], |
2240 | "limit": 1000, |
2241 | "meta": {}, |
2242 | "mode": "list", |
2243 | "orderBy": [], |
2244 | "queryType": "table", |
2245 | "table": "caddy_requests" |
2246 | } |
2247 | }, |
2248 | "pluginVersion": "4.10.1", |
2249 | "queryType": "table", |
2250 | "rawSql": "SELECT\n remote_ip, method, host, uri, status, bytes_sent, duration_ms\t\nFROM logs.caddy_requests\nWHERE ( ts >= $__fromTime AND ts <= $__toTime )\n AND host LIKE '%${Application}%'\n AND remote_ip LIKE '%${IP}%'\nORDER BY ts DESC\nLIMIT 200", |
2251 | "refId": "Hot Application" |
2252 | } |
2253 | ], |
2254 | "title": "RAW", |
2255 | "type": "table" |
2256 | } |
2257 | ], |
2258 | "refresh": "30s", |
2259 | "schemaVersion": 39, |
2260 | "tags": [], |
2261 | "templating": { |
2262 | "list": [ |
2263 | { |
2264 | "current": { |
2265 | "selected": false, |
2266 | "text": "", |
2267 | "value": "" |
2268 | }, |
2269 | "description": "Application", |
2270 | "hide": 0, |
2271 | "label": "Application", |
2272 | "name": "Application", |
2273 | "options": [ |
2274 | { |
2275 | "selected": true, |
2276 | "text": "", |
2277 | "value": "" |
2278 | } |
2279 | ], |
2280 | "query": "", |
2281 | "skipUrlSync": false, |
2282 | "type": "textbox" |
2283 | }, |
2284 | { |
2285 | "current": { |
2286 | "selected": false, |
2287 | "text": "", |
2288 | "value": "" |
2289 | }, |
2290 | "description": "IP", |
2291 | "hide": 0, |
2292 | "label": "IP", |
2293 | "name": "IP", |
2294 | "options": [ |
2295 | { |
2296 | "selected": true, |
2297 | "text": "", |
2298 | "value": "" |
2299 | } |
2300 | ], |
2301 | "query": "", |
2302 | "skipUrlSync": false, |
2303 | "type": "textbox" |
2304 | } |
2305 | ] |
2306 | }, |
2307 | "time": { |
2308 | "from": "now-1h", |
2309 | "to": "now" |
2310 | }, |
2311 | "timepicker": {}, |
2312 | "timezone": "browser", |
2313 | "title": "Caddy", |
2314 | "uid": "eet9bprvewlq8e", |
2315 | "version": 54, |
2316 | "weekStart": "" |
2317 | } |