961 lines
24 KiB
JSON
961 lines
24 KiB
JSON
|
{
|
||
|
"annotations": {
|
||
|
"list": [
|
||
|
{
|
||
|
"builtIn": 1,
|
||
|
"datasource": "-- Grafana --",
|
||
|
"enable": true,
|
||
|
"hide": true,
|
||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||
|
"name": "Annotations & Alerts",
|
||
|
"target": {
|
||
|
"limit": 100,
|
||
|
"matchAny": false,
|
||
|
"tags": [],
|
||
|
"type": "dashboard"
|
||
|
},
|
||
|
"type": "dashboard"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"description": "Query report for blocky (MySQL)",
|
||
|
"editable": true,
|
||
|
"gnetId": 14980,
|
||
|
"graphTooltip": 0,
|
||
|
"id": 9,
|
||
|
"iteration": 1668211080361,
|
||
|
"links": [],
|
||
|
"panels": [
|
||
|
{
|
||
|
"aliasColors": {},
|
||
|
"breakPoint": "50%",
|
||
|
"cacheTimeout": null,
|
||
|
"combine": {
|
||
|
"label": "Others",
|
||
|
"threshold": 0
|
||
|
},
|
||
|
"datasource": "Blocky logs",
|
||
|
"description": "",
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"color": {
|
||
|
"mode": "palette-classic"
|
||
|
},
|
||
|
"custom": {
|
||
|
"hideFrom": {
|
||
|
"legend": false,
|
||
|
"tooltip": false,
|
||
|
"viz": false
|
||
|
}
|
||
|
},
|
||
|
"displayName": "${__field.labels.response_type}",
|
||
|
"mappings": [],
|
||
|
"unit": "short"
|
||
|
},
|
||
|
"overrides": []
|
||
|
},
|
||
|
"fontSize": "80%",
|
||
|
"format": "short",
|
||
|
"gridPos": {
|
||
|
"h": 8,
|
||
|
"w": 6,
|
||
|
"x": 0,
|
||
|
"y": 0
|
||
|
},
|
||
|
"id": 14,
|
||
|
"interval": null,
|
||
|
"legend": {
|
||
|
"show": true,
|
||
|
"values": true
|
||
|
},
|
||
|
"legendType": "Under graph",
|
||
|
"links": [],
|
||
|
"nullPointMode": "connected",
|
||
|
"pieType": "pie",
|
||
|
"pluginVersion": "8.1.2",
|
||
|
"repeatDirection": "v",
|
||
|
"strokeWidth": 1,
|
||
|
"targets": [
|
||
|
{
|
||
|
"format": "time_series",
|
||
|
"group": [],
|
||
|
"metricColumn": "none",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT t.response_type, t.request_Ts as time, count(*) as cnt from log_entries t \n WHERE $__timeFilter(t.request_Ts) and \n t.response_type in ($response_type) and \n t.client_name in ($client_name) and \n (length('$question') = 0 or INSTR(t.question_name, lower('$question')) > 0)\n group by t.response_type\n order by t.request_Ts",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": [
|
||
|
"value"
|
||
|
],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"timeColumn": "time",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"timeFrom": null,
|
||
|
"timeShift": null,
|
||
|
"title": "Query count by response type",
|
||
|
"transformations": [],
|
||
|
"type": "grafana-piechart-panel",
|
||
|
"valueName": "current"
|
||
|
},
|
||
|
{
|
||
|
"aliasColors": {},
|
||
|
"breakPoint": "50%",
|
||
|
"cacheTimeout": null,
|
||
|
"combine": {
|
||
|
"label": "Others",
|
||
|
"threshold": 0
|
||
|
},
|
||
|
"datasource": "Blocky logs",
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"color": {
|
||
|
"mode": "palette-classic"
|
||
|
},
|
||
|
"custom": {
|
||
|
"hideFrom": {
|
||
|
"legend": false,
|
||
|
"tooltip": false,
|
||
|
"viz": false
|
||
|
}
|
||
|
},
|
||
|
"mappings": []
|
||
|
},
|
||
|
"overrides": []
|
||
|
},
|
||
|
"fontSize": "80%",
|
||
|
"format": "short",
|
||
|
"gridPos": {
|
||
|
"h": 8,
|
||
|
"w": 6,
|
||
|
"x": 6,
|
||
|
"y": 0
|
||
|
},
|
||
|
"id": 16,
|
||
|
"interval": null,
|
||
|
"legend": {
|
||
|
"show": true,
|
||
|
"values": true
|
||
|
},
|
||
|
"legendType": "Under graph",
|
||
|
"links": [],
|
||
|
"nullPointMode": "connected",
|
||
|
"pieType": "pie",
|
||
|
"strokeWidth": 1,
|
||
|
"targets": [
|
||
|
{
|
||
|
"format": "time_series",
|
||
|
"group": [],
|
||
|
"metricColumn": "none",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT t.request_ts AS time,\n case when t.reason like 'BLOCKED%' then SUBSTRING_INDEX(SUBSTRING_INDEX(t.reason,'(',-1), ')',1) else '' end AS metric,\n count(t.reason) AS cnt\nFROM log_entries t\nWHERE t.response_type ='BLOCKED'\n AND $__timeFilter(t.request_Ts)\n AND t.client_name in ($client_name)\n AND (length('$question') = 0 or INSTR(t.question_name, lower('$question')) > 0)\nGROUP BY 2\nORDER BY time",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": [
|
||
|
"duration_ms"
|
||
|
],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"table": "log_entries",
|
||
|
"timeColumn": "request_ts",
|
||
|
"timeColumnType": "timestamp",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"title": "Blocked by Blacklist",
|
||
|
"type": "grafana-piechart-panel",
|
||
|
"valueName": "current"
|
||
|
},
|
||
|
{
|
||
|
"cacheTimeout": null,
|
||
|
"datasource": "Blocky logs",
|
||
|
"description": "",
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"color": {
|
||
|
"mode": "thresholds"
|
||
|
},
|
||
|
"custom": {
|
||
|
"align": null,
|
||
|
"filterable": false
|
||
|
},
|
||
|
"displayName": "$__cell_1",
|
||
|
"mappings": [],
|
||
|
"thresholds": {
|
||
|
"mode": "absolute",
|
||
|
"steps": [
|
||
|
{
|
||
|
"color": "green",
|
||
|
"value": null
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"unit": "short"
|
||
|
},
|
||
|
"overrides": []
|
||
|
},
|
||
|
"gridPos": {
|
||
|
"h": 8,
|
||
|
"w": 12,
|
||
|
"x": 12,
|
||
|
"y": 0
|
||
|
},
|
||
|
"id": 13,
|
||
|
"interval": null,
|
||
|
"links": [],
|
||
|
"options": {
|
||
|
"displayMode": "gradient",
|
||
|
"orientation": "horizontal",
|
||
|
"reduceOptions": {
|
||
|
"calcs": [
|
||
|
"lastNotNull"
|
||
|
],
|
||
|
"fields": "",
|
||
|
"values": true
|
||
|
},
|
||
|
"showUnfilled": true,
|
||
|
"text": {}
|
||
|
},
|
||
|
"pluginVersion": "7.3.6",
|
||
|
"repeatDirection": "v",
|
||
|
"targets": [
|
||
|
{
|
||
|
"format": "table",
|
||
|
"group": [],
|
||
|
"metricColumn": "f",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT t.request_Ts as time, t.client_name as metric, count(*) as cnt from log_entries t \n WHERE $__timeFilter(t.request_Ts) and \n t.response_type in ($response_type) and \n t.client_name in ($client_name) and \n (length('$question') = 0 or INSTR(t.question_name, lower('$question')) > 0)\n group by t.client_name\n order by 3 desc",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": [
|
||
|
"value"
|
||
|
],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"timeColumn": "time",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"timeFrom": null,
|
||
|
"timeShift": null,
|
||
|
"title": "Query count by client",
|
||
|
"transformations": [],
|
||
|
"type": "bargauge"
|
||
|
},
|
||
|
{
|
||
|
"datasource": "Blocky logs",
|
||
|
"description": "Top 20 effective top level domain plus one more label",
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"color": {
|
||
|
"mode": "thresholds"
|
||
|
},
|
||
|
"custom": {
|
||
|
"align": null,
|
||
|
"axisLabel": "",
|
||
|
"axisPlacement": "auto",
|
||
|
"axisSoftMin": 0,
|
||
|
"fillOpacity": 67,
|
||
|
"filterable": false,
|
||
|
"gradientMode": "none",
|
||
|
"hideFrom": {
|
||
|
"legend": false,
|
||
|
"tooltip": false,
|
||
|
"viz": false
|
||
|
},
|
||
|
"lineWidth": 2
|
||
|
},
|
||
|
"displayName": "$__cell_0",
|
||
|
"mappings": [],
|
||
|
"thresholds": {
|
||
|
"mode": "absolute",
|
||
|
"steps": [
|
||
|
{
|
||
|
"color": "green",
|
||
|
"value": null
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"unit": "short"
|
||
|
},
|
||
|
"overrides": []
|
||
|
},
|
||
|
"gridPos": {
|
||
|
"h": 8,
|
||
|
"w": 12,
|
||
|
"x": 0,
|
||
|
"y": 8
|
||
|
},
|
||
|
"id": 11,
|
||
|
"options": {
|
||
|
"displayMode": "gradient",
|
||
|
"orientation": "horizontal",
|
||
|
"reduceOptions": {
|
||
|
"calcs": [
|
||
|
"mean"
|
||
|
],
|
||
|
"fields": "",
|
||
|
"values": true
|
||
|
},
|
||
|
"showUnfilled": true
|
||
|
},
|
||
|
"pluginVersion": "7.3.6",
|
||
|
"targets": [
|
||
|
{
|
||
|
"format": "table",
|
||
|
"group": [],
|
||
|
"hide": false,
|
||
|
"metricColumn": "question_name",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT t.effective_tldp as metric, count(*) as value from log_entries t \nWHERE $__timeFilter(t.request_Ts) \n and t.response_type in ($response_type) \n and t.client_name in ($client_name) \n and (length('$question') = 0 or INSTR(t.question_name, lower('$question')) > 0) \n group by t.effective_tldp order by count(*) desc limit 20",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": [
|
||
|
"value"
|
||
|
],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"table": "log_entries",
|
||
|
"timeColumn": "request_ts",
|
||
|
"where": []
|
||
|
}
|
||
|
],
|
||
|
"timeFrom": null,
|
||
|
"timeShift": null,
|
||
|
"title": "Top 20 effective TLD+1",
|
||
|
"type": "bargauge"
|
||
|
},
|
||
|
{
|
||
|
"datasource": "Blocky logs",
|
||
|
"description": "",
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"color": {
|
||
|
"mode": "thresholds"
|
||
|
},
|
||
|
"custom": {
|
||
|
"align": null,
|
||
|
"axisLabel": "",
|
||
|
"axisPlacement": "auto",
|
||
|
"axisSoftMin": 0,
|
||
|
"fillOpacity": 67,
|
||
|
"filterable": false,
|
||
|
"gradientMode": "none",
|
||
|
"hideFrom": {
|
||
|
"legend": false,
|
||
|
"tooltip": false,
|
||
|
"viz": false
|
||
|
},
|
||
|
"lineWidth": 2
|
||
|
},
|
||
|
"displayName": "$__cell_0",
|
||
|
"mappings": [],
|
||
|
"thresholds": {
|
||
|
"mode": "absolute",
|
||
|
"steps": [
|
||
|
{
|
||
|
"color": "green",
|
||
|
"value": null
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"unit": "short"
|
||
|
},
|
||
|
"overrides": []
|
||
|
},
|
||
|
"gridPos": {
|
||
|
"h": 8,
|
||
|
"w": 12,
|
||
|
"x": 12,
|
||
|
"y": 8
|
||
|
},
|
||
|
"id": 8,
|
||
|
"options": {
|
||
|
"displayMode": "gradient",
|
||
|
"orientation": "horizontal",
|
||
|
"reduceOptions": {
|
||
|
"calcs": [
|
||
|
"mean"
|
||
|
],
|
||
|
"fields": "",
|
||
|
"values": true
|
||
|
},
|
||
|
"showUnfilled": true
|
||
|
},
|
||
|
"pluginVersion": "7.3.6",
|
||
|
"targets": [
|
||
|
{
|
||
|
"format": "table",
|
||
|
"group": [],
|
||
|
"hide": false,
|
||
|
"metricColumn": "question_name",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT t.question_name as metric, count(*) as value from log_entries t \n WHERE $__timeFilter(t.request_Ts) and \n t.response_type in ($response_type) and \n t.client_name in ($client_name) and \n (length('$question') = 0 or INSTR(t.question_name, lower('$question')) > 0) \n group by t.question_name order by count(*) desc limit 20",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": [
|
||
|
"value"
|
||
|
],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"table": "log_entries",
|
||
|
"timeColumn": "request_ts",
|
||
|
"where": []
|
||
|
}
|
||
|
],
|
||
|
"timeFrom": null,
|
||
|
"timeShift": null,
|
||
|
"title": "Top 20 queried domains",
|
||
|
"type": "bargauge"
|
||
|
},
|
||
|
{
|
||
|
"aliasColors": {},
|
||
|
"bars": false,
|
||
|
"dashLength": 10,
|
||
|
"dashes": false,
|
||
|
"datasource": "Blocky logs",
|
||
|
"description": "",
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"color": {
|
||
|
"mode": "palette-classic"
|
||
|
},
|
||
|
"custom": {
|
||
|
"align": null,
|
||
|
"axisLabel": "queries count",
|
||
|
"axisPlacement": "auto",
|
||
|
"barAlignment": 0,
|
||
|
"drawStyle": "bars",
|
||
|
"fillOpacity": 35,
|
||
|
"filterable": false,
|
||
|
"gradientMode": "hue",
|
||
|
"hideFrom": {
|
||
|
"legend": false,
|
||
|
"tooltip": false,
|
||
|
"viz": false
|
||
|
},
|
||
|
"lineInterpolation": "linear",
|
||
|
"lineStyle": {
|
||
|
"fill": "solid"
|
||
|
},
|
||
|
"lineWidth": 1,
|
||
|
"pointSize": 12,
|
||
|
"scaleDistribution": {
|
||
|
"type": "linear"
|
||
|
},
|
||
|
"showPoints": "never",
|
||
|
"spanNulls": 3600000,
|
||
|
"stacking": {
|
||
|
"group": "A",
|
||
|
"mode": "none"
|
||
|
},
|
||
|
"thresholdsStyle": {
|
||
|
"mode": "off"
|
||
|
}
|
||
|
},
|
||
|
"mappings": [],
|
||
|
"thresholds": {
|
||
|
"mode": "absolute",
|
||
|
"steps": [
|
||
|
{
|
||
|
"color": "green",
|
||
|
"value": null
|
||
|
},
|
||
|
{
|
||
|
"color": "red",
|
||
|
"value": 80
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"overrides": []
|
||
|
},
|
||
|
"fill": 1,
|
||
|
"fillGradient": 0,
|
||
|
"gridPos": {
|
||
|
"h": 7,
|
||
|
"w": 24,
|
||
|
"x": 0,
|
||
|
"y": 16
|
||
|
},
|
||
|
"hiddenSeries": false,
|
||
|
"id": 12,
|
||
|
"legend": {
|
||
|
"avg": false,
|
||
|
"current": false,
|
||
|
"max": false,
|
||
|
"min": false,
|
||
|
"show": true,
|
||
|
"total": false,
|
||
|
"values": false
|
||
|
},
|
||
|
"lines": true,
|
||
|
"linewidth": 1,
|
||
|
"nullPointMode": "null",
|
||
|
"options": {
|
||
|
"alertThreshold": true
|
||
|
},
|
||
|
"percentage": false,
|
||
|
"pluginVersion": "7.3.6",
|
||
|
"pointradius": 2,
|
||
|
"points": false,
|
||
|
"renderer": "flot",
|
||
|
"seriesOverrides": [],
|
||
|
"spaceLength": 10,
|
||
|
"stack": false,
|
||
|
"steppedLine": false,
|
||
|
"targets": [
|
||
|
{
|
||
|
"format": "time_series",
|
||
|
"group": [],
|
||
|
"metricColumn": "none",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT\n $__timeGroupAlias(t.request_Ts, '30m'),\n t.client_name as metric,\n count(*) as c\nFROM log_entries t\nWHERE\n $__timeFilter(t.request_Ts) and \n t.response_type in ($response_type) and \n t.client_name in ($client_name) and \n (length('$question') = 0 or INSTR(t.question_name, lower('$question')) > 0)\nGROUP BY 1,2\nORDER BY 1",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": [
|
||
|
"duration_ms"
|
||
|
],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"table": "log_entries",
|
||
|
"timeColumn": "request_ts",
|
||
|
"timeColumnType": "timestamp",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"thresholds": [],
|
||
|
"timeFrom": null,
|
||
|
"timeRegions": [],
|
||
|
"timeShift": null,
|
||
|
"title": "Queries number per client (30m)",
|
||
|
"tooltip": {
|
||
|
"shared": true,
|
||
|
"sort": 0,
|
||
|
"value_type": "individual"
|
||
|
},
|
||
|
"type": "graph",
|
||
|
"xaxis": {
|
||
|
"buckets": null,
|
||
|
"mode": "time",
|
||
|
"name": null,
|
||
|
"show": true,
|
||
|
"values": []
|
||
|
},
|
||
|
"yaxes": [
|
||
|
{
|
||
|
"format": "short",
|
||
|
"label": null,
|
||
|
"logBase": 1,
|
||
|
"max": null,
|
||
|
"min": null,
|
||
|
"show": true
|
||
|
},
|
||
|
{
|
||
|
"format": "short",
|
||
|
"label": null,
|
||
|
"logBase": 1,
|
||
|
"max": null,
|
||
|
"min": null,
|
||
|
"show": true
|
||
|
}
|
||
|
],
|
||
|
"yaxis": {
|
||
|
"align": false,
|
||
|
"alignLevel": null
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"aliasColors": {},
|
||
|
"bars": false,
|
||
|
"dashLength": 10,
|
||
|
"dashes": false,
|
||
|
"datasource": "Blocky logs",
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"color": {
|
||
|
"mode": "palette-classic"
|
||
|
},
|
||
|
"custom": {
|
||
|
"axisLabel": "",
|
||
|
"axisPlacement": "auto",
|
||
|
"barAlignment": -1,
|
||
|
"drawStyle": "bars",
|
||
|
"fillOpacity": 0,
|
||
|
"gradientMode": "none",
|
||
|
"hideFrom": {
|
||
|
"legend": false,
|
||
|
"tooltip": false,
|
||
|
"viz": false
|
||
|
},
|
||
|
"lineInterpolation": "stepBefore",
|
||
|
"lineStyle": {
|
||
|
"fill": "solid"
|
||
|
},
|
||
|
"lineWidth": 1,
|
||
|
"pointSize": 5,
|
||
|
"scaleDistribution": {
|
||
|
"type": "linear"
|
||
|
},
|
||
|
"showPoints": "auto",
|
||
|
"spanNulls": true,
|
||
|
"stacking": {
|
||
|
"group": "A",
|
||
|
"mode": "none"
|
||
|
},
|
||
|
"thresholdsStyle": {
|
||
|
"mode": "line"
|
||
|
}
|
||
|
},
|
||
|
"mappings": [],
|
||
|
"thresholds": {
|
||
|
"mode": "absolute",
|
||
|
"steps": [
|
||
|
{
|
||
|
"color": "green",
|
||
|
"value": null
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"unit": "dtdurationms"
|
||
|
},
|
||
|
"overrides": []
|
||
|
},
|
||
|
"fill": 1,
|
||
|
"fillGradient": 0,
|
||
|
"gridPos": {
|
||
|
"h": 8,
|
||
|
"w": 24,
|
||
|
"x": 0,
|
||
|
"y": 23
|
||
|
},
|
||
|
"hiddenSeries": false,
|
||
|
"id": 10,
|
||
|
"legend": {
|
||
|
"avg": false,
|
||
|
"current": false,
|
||
|
"max": false,
|
||
|
"min": false,
|
||
|
"show": true,
|
||
|
"total": false,
|
||
|
"values": false
|
||
|
},
|
||
|
"lines": true,
|
||
|
"linewidth": 1,
|
||
|
"nullPointMode": "null",
|
||
|
"options": {
|
||
|
"alertThreshold": true
|
||
|
},
|
||
|
"percentage": false,
|
||
|
"pluginVersion": "7.3.6",
|
||
|
"pointradius": 2,
|
||
|
"points": false,
|
||
|
"renderer": "flot",
|
||
|
"seriesOverrides": [],
|
||
|
"spaceLength": 10,
|
||
|
"stack": false,
|
||
|
"steppedLine": false,
|
||
|
"targets": [
|
||
|
{
|
||
|
"format": "time_series",
|
||
|
"group": [],
|
||
|
"metricColumn": "none",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT\n UNIX_TIMESTAMP(t.request_Ts) as time,\n t.duration_ms\nFROM log_entries t\nWHERE\n $__timeFilter(t.request_Ts) and \n t.response_type in ($response_type) and \n t.client_name in ($client_name) and \n (length('$question') = 0 or INSTR(t.question_name, lower('$question')) > 0)\nORDER BY request_ts",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": [
|
||
|
"duration_ms"
|
||
|
],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"table": "log_entries",
|
||
|
"timeColumn": "request_ts",
|
||
|
"timeColumnType": "timestamp",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"thresholds": [],
|
||
|
"timeFrom": null,
|
||
|
"timeRegions": [],
|
||
|
"timeShift": null,
|
||
|
"title": "Query duration",
|
||
|
"tooltip": {
|
||
|
"shared": true,
|
||
|
"sort": 0,
|
||
|
"value_type": "individual"
|
||
|
},
|
||
|
"type": "graph",
|
||
|
"xaxis": {
|
||
|
"buckets": null,
|
||
|
"mode": "time",
|
||
|
"name": null,
|
||
|
"show": true,
|
||
|
"values": []
|
||
|
},
|
||
|
"yaxes": [
|
||
|
{
|
||
|
"format": "dtdurationms",
|
||
|
"label": null,
|
||
|
"logBase": 1,
|
||
|
"max": null,
|
||
|
"min": null,
|
||
|
"show": true
|
||
|
},
|
||
|
{
|
||
|
"format": "short",
|
||
|
"label": null,
|
||
|
"logBase": 1,
|
||
|
"max": null,
|
||
|
"min": null,
|
||
|
"show": true
|
||
|
}
|
||
|
],
|
||
|
"yaxis": {
|
||
|
"align": false,
|
||
|
"alignLevel": null
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"datasource": "Blocky logs",
|
||
|
"description": "Last 100 queries, newest on top",
|
||
|
"fieldConfig": {
|
||
|
"defaults": {
|
||
|
"custom": {
|
||
|
"align": null,
|
||
|
"displayMode": "auto",
|
||
|
"filterable": false
|
||
|
},
|
||
|
"mappings": [],
|
||
|
"thresholds": {
|
||
|
"mode": "absolute",
|
||
|
"steps": [
|
||
|
{
|
||
|
"color": "green",
|
||
|
"value": null
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"overrides": [
|
||
|
{
|
||
|
"matcher": {
|
||
|
"id": "byName",
|
||
|
"options": "time"
|
||
|
},
|
||
|
"properties": [
|
||
|
{
|
||
|
"id": "unit",
|
||
|
"value": "dateTimeAsIsoNoDateIfToday"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"gridPos": {
|
||
|
"h": 8,
|
||
|
"w": 24,
|
||
|
"x": 0,
|
||
|
"y": 31
|
||
|
},
|
||
|
"id": 4,
|
||
|
"options": {
|
||
|
"showHeader": true
|
||
|
},
|
||
|
"pluginVersion": "7.3.6",
|
||
|
"targets": [
|
||
|
{
|
||
|
"format": "table",
|
||
|
"group": [],
|
||
|
"metricColumn": "none",
|
||
|
"rawQuery": true,
|
||
|
"rawSql": "SELECT UNIX_TIMESTAMP(t.request_Ts) as \"time\", \n t.client_ip as \"client IP\", \n t.client_name as \"client name\", \n t.duration_ms as \"duration in ms\", \n t.response_type as \"response type\", \n t.question_type as \"question type\", \n t.question_name as \"question name\", \n t.effective_tldp as \"effective TLD+1\", \n t.answer as \"answer\" from log_entries t \n WHERE $__timeFilter(t.request_Ts) and \n t.response_type in ($response_type) and \n t.client_name in ($client_name) and \n (length('$question') = 0 or INSTR(t.question_name, lower('$question')) > 0) \n order by t.request_Ts desc limit 100",
|
||
|
"refId": "A",
|
||
|
"select": [
|
||
|
[
|
||
|
{
|
||
|
"params": [
|
||
|
"value"
|
||
|
],
|
||
|
"type": "column"
|
||
|
}
|
||
|
]
|
||
|
],
|
||
|
"timeColumn": "time",
|
||
|
"where": [
|
||
|
{
|
||
|
"name": "$__timeFilter",
|
||
|
"params": [],
|
||
|
"type": "macro"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"timeFrom": null,
|
||
|
"timeShift": null,
|
||
|
"title": "Last queries",
|
||
|
"type": "table"
|
||
|
}
|
||
|
],
|
||
|
"refresh": "",
|
||
|
"schemaVersion": 26,
|
||
|
"style": "dark",
|
||
|
"tags": [],
|
||
|
"templating": {
|
||
|
"list": [
|
||
|
{
|
||
|
"allValue": "",
|
||
|
"current": {
|
||
|
"selected": false,
|
||
|
"text": "All",
|
||
|
"value": "$__all"
|
||
|
},
|
||
|
"datasource": "Blocky logs",
|
||
|
"definition": "select distinct client_name from log_entries",
|
||
|
"description": null,
|
||
|
"error": null,
|
||
|
"hide": 0,
|
||
|
"includeAll": true,
|
||
|
"label": "Client name",
|
||
|
"multi": true,
|
||
|
"name": "client_name",
|
||
|
"options": [],
|
||
|
"query": "select distinct client_name from log_entries",
|
||
|
"refresh": 2,
|
||
|
"regex": "",
|
||
|
"skipUrlSync": false,
|
||
|
"sort": 1,
|
||
|
"tagValuesQuery": "",
|
||
|
"tags": [],
|
||
|
"tagsQuery": "",
|
||
|
"type": "query",
|
||
|
"useTags": false
|
||
|
},
|
||
|
{
|
||
|
"allValue": null,
|
||
|
"current": {
|
||
|
"selected": true,
|
||
|
"tags": [],
|
||
|
"text": [
|
||
|
"All"
|
||
|
],
|
||
|
"value": [
|
||
|
"$__all"
|
||
|
]
|
||
|
},
|
||
|
"datasource": "Blocky logs",
|
||
|
"definition": "select distinct response_type from log_entries",
|
||
|
"description": null,
|
||
|
"error": null,
|
||
|
"hide": 0,
|
||
|
"includeAll": true,
|
||
|
"label": "Response type",
|
||
|
"multi": true,
|
||
|
"name": "response_type",
|
||
|
"options": [],
|
||
|
"query": "select distinct response_type from log_entries",
|
||
|
"refresh": 2,
|
||
|
"regex": "",
|
||
|
"skipUrlSync": false,
|
||
|
"sort": 1,
|
||
|
"tagValuesQuery": "",
|
||
|
"tags": [],
|
||
|
"tagsQuery": "",
|
||
|
"type": "query",
|
||
|
"useTags": false
|
||
|
},
|
||
|
{
|
||
|
"current": {
|
||
|
"selected": false,
|
||
|
"text": "",
|
||
|
"value": ""
|
||
|
},
|
||
|
"description": null,
|
||
|
"error": null,
|
||
|
"hide": 0,
|
||
|
"label": "Domain (contains)",
|
||
|
"name": "question",
|
||
|
"options": [
|
||
|
{
|
||
|
"selected": true,
|
||
|
"text": "",
|
||
|
"value": ""
|
||
|
}
|
||
|
],
|
||
|
"query": "",
|
||
|
"skipUrlSync": false,
|
||
|
"type": "textbox"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"time": {
|
||
|
"from": "now-24h",
|
||
|
"to": "now"
|
||
|
},
|
||
|
"timepicker": {},
|
||
|
"timezone": "",
|
||
|
"title": "Blocky query",
|
||
|
"uid": "AVmWSVWgz",
|
||
|
"version": 11
|
||
|
}
|