fix error graph
This commit is contained in:
parent
c563886382
commit
4c014604ce
@ -18,7 +18,7 @@
|
|||||||
"editable": true,
|
"editable": true,
|
||||||
"fiscalYearStartMonth": 0,
|
"fiscalYearStartMonth": 0,
|
||||||
"graphTooltip": 0,
|
"graphTooltip": 0,
|
||||||
"id": 3,
|
"id": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"liveNow": false,
|
"liveNow": false,
|
||||||
"panels": [
|
"panels": [
|
||||||
@ -38,7 +38,7 @@
|
|||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "grafana-clickhouse-datasource",
|
"type": "grafana-clickhouse-datasource",
|
||||||
"uid": "f70e773b-26c3-4b74-9a45-291fab27524b"
|
"uid": "ef7b4f5b-7011-411b-88c2-4b2681b8ddbe"
|
||||||
},
|
},
|
||||||
"description": "",
|
"description": "",
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
@ -47,6 +47,7 @@
|
|||||||
"mode": "palette-classic"
|
"mode": "palette-classic"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
|
"axisBorderShow": false,
|
||||||
"axisCenteredZero": false,
|
"axisCenteredZero": false,
|
||||||
"axisColorMode": "series",
|
"axisColorMode": "series",
|
||||||
"axisLabel": "",
|
"axisLabel": "",
|
||||||
@ -156,6 +157,22 @@
|
|||||||
"operator": "LIKE",
|
"operator": "LIKE",
|
||||||
"type": "String",
|
"type": "String",
|
||||||
"value": "$filter1"
|
"value": "$filter1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "AND",
|
||||||
|
"filterType": "custom",
|
||||||
|
"key": "message",
|
||||||
|
"operator": "LIKE",
|
||||||
|
"type": "String",
|
||||||
|
"value": "$filter2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "AND",
|
||||||
|
"filterType": "custom",
|
||||||
|
"key": "message",
|
||||||
|
"operator": "LIKE",
|
||||||
|
"type": "String",
|
||||||
|
"value": "$filter3"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"limit": 5000,
|
"limit": 5000,
|
||||||
@ -174,10 +191,10 @@
|
|||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "grafana-clickhouse-datasource",
|
"type": "grafana-clickhouse-datasource",
|
||||||
"uid": "f70e773b-26c3-4b74-9a45-291fab27524b"
|
"uid": "ef7b4f5b-7011-411b-88c2-4b2681b8ddbe"
|
||||||
},
|
},
|
||||||
"queryType": "builder",
|
"queryType": "builder",
|
||||||
"rawSql": "SELECT $__timeInterval(logdatetime) as time, count() FROM \"default\".\"log_docker_raw\" WHERE $__timeFilter(logdatetime) AND ( logdatetime >= $__fromTime AND logdatetime <= $__toTime ) AND ( program = ${program:singlequote} ) AND ( message LIKE '%$filter1%' ) GROUP BY time ORDER BY time ASC LIMIT 5000",
|
"rawSql": "SELECT $__timeInterval(logdatetime) as time, count() FROM \"default\".\"log_docker_raw\" WHERE $__timeFilter(logdatetime) AND ( logdatetime >= $__fromTime AND logdatetime <= $__toTime ) AND ( program = ${program:singlequote} ) AND ( message LIKE '%$filter1%' ) AND ( message LIKE '%$filter2%' ) AND ( message LIKE '%$filter3%' ) GROUP BY time ORDER BY time ASC LIMIT 5000",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -187,14 +204,16 @@
|
|||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "grafana-clickhouse-datasource",
|
"type": "grafana-clickhouse-datasource",
|
||||||
"uid": "f70e773b-26c3-4b74-9a45-291fab27524b"
|
"uid": "ef7b4f5b-7011-411b-88c2-4b2681b8ddbe"
|
||||||
},
|
},
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
"color": {
|
"color": {
|
||||||
"mode": "palette-classic"
|
"fixedColor": "red",
|
||||||
|
"mode": "fixed"
|
||||||
},
|
},
|
||||||
"custom": {
|
"custom": {
|
||||||
|
"axisBorderShow": false,
|
||||||
"axisCenteredZero": false,
|
"axisCenteredZero": false,
|
||||||
"axisColorMode": "text",
|
"axisColorMode": "text",
|
||||||
"axisLabel": "",
|
"axisLabel": "",
|
||||||
@ -229,13 +248,9 @@
|
|||||||
"thresholds": {
|
"thresholds": {
|
||||||
"mode": "absolute",
|
"mode": "absolute",
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
|
||||||
"color": "green",
|
|
||||||
"value": null
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"color": "red",
|
"color": "red",
|
||||||
"value": 80
|
"value": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -311,11 +326,61 @@
|
|||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "grafana-clickhouse-datasource",
|
"type": "grafana-clickhouse-datasource",
|
||||||
"uid": "f70e773b-26c3-4b74-9a45-291fab27524b"
|
"uid": "ef7b4f5b-7011-411b-88c2-4b2681b8ddbe"
|
||||||
},
|
},
|
||||||
"queryType": "builder",
|
"format": 1,
|
||||||
"rawSql": "SELECT $__timeInterval(logdatetime) as time FROM \"default\".\"log_docker_raw\" WHERE $__timeFilter(logdatetime) AND ( logdatetime >= $__fromTime AND logdatetime <= $__toTime ) AND ( priority = 'error' ) AND ( message LIKE '%$filter1%' ) GROUP BY time ORDER BY time ASC LIMIT 5000",
|
"meta": {
|
||||||
"refId": "A"
|
"builderOptions": {
|
||||||
|
"database": "default",
|
||||||
|
"fields": [
|
||||||
|
"priority"
|
||||||
|
],
|
||||||
|
"filters": [
|
||||||
|
{
|
||||||
|
"condition": "AND",
|
||||||
|
"filterType": "custom",
|
||||||
|
"key": "logdatetime",
|
||||||
|
"operator": "WITH IN DASHBOARD TIME RANGE",
|
||||||
|
"restrictToFields": [
|
||||||
|
{
|
||||||
|
"label": "logdatetime",
|
||||||
|
"name": "logdatetime",
|
||||||
|
"picklistValues": [],
|
||||||
|
"type": "DateTime"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"type": "datetime"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "AND",
|
||||||
|
"filterType": "custom",
|
||||||
|
"key": "priority",
|
||||||
|
"operator": "=",
|
||||||
|
"type": "String",
|
||||||
|
"value": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"condition": "AND",
|
||||||
|
"filterType": "custom",
|
||||||
|
"key": "message",
|
||||||
|
"operator": "LIKE",
|
||||||
|
"type": "String",
|
||||||
|
"value": "$filter1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"limit": 5000,
|
||||||
|
"metrics": [],
|
||||||
|
"mode": "trend",
|
||||||
|
"orderBy": [],
|
||||||
|
"table": "log_docker_raw",
|
||||||
|
"timeField": "logdatetime",
|
||||||
|
"timeFieldType": "DateTime"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"queryType": "sql",
|
||||||
|
"rawSql": "SELECT $__timeInterval(logdatetime) as time, count() FROM \"default\".\"log_docker_raw\" WHERE $__timeFilter(logdatetime) AND ( logdatetime >= $__fromTime AND logdatetime <= $__toTime ) AND ( visitParamExtractString(message, 'level') = 'ERROR' ) AND ( program = ${program:singlequote} ) AND ( message LIKE '%$filter1%' ) AND ( message LIKE '%$filter2%' ) AND ( message LIKE '%$filter3%' ) GROUP BY time ORDER BY time ASC LIMIT 5000\n\n",
|
||||||
|
"refId": "A",
|
||||||
|
"selectedFormat": 4
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Total errors",
|
"title": "Total errors",
|
||||||
@ -337,7 +402,7 @@
|
|||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "grafana-clickhouse-datasource",
|
"type": "grafana-clickhouse-datasource",
|
||||||
"uid": "f70e773b-26c3-4b74-9a45-291fab27524b"
|
"uid": "ef7b4f5b-7011-411b-88c2-4b2681b8ddbe"
|
||||||
},
|
},
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
@ -622,7 +687,7 @@
|
|||||||
"showHeader": true,
|
"showHeader": true,
|
||||||
"sortBy": []
|
"sortBy": []
|
||||||
},
|
},
|
||||||
"pluginVersion": "10.1.5",
|
"pluginVersion": "10.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"builderOptions": {
|
"builderOptions": {
|
||||||
@ -674,7 +739,7 @@
|
|||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "grafana-clickhouse-datasource",
|
"type": "grafana-clickhouse-datasource",
|
||||||
"uid": "f70e773b-26c3-4b74-9a45-291fab27524b"
|
"uid": "ef7b4f5b-7011-411b-88c2-4b2681b8ddbe"
|
||||||
},
|
},
|
||||||
"format": 1,
|
"format": 1,
|
||||||
"meta": {
|
"meta": {
|
||||||
@ -766,7 +831,7 @@
|
|||||||
{
|
{
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "grafana-clickhouse-datasource",
|
"type": "grafana-clickhouse-datasource",
|
||||||
"uid": "f70e773b-26c3-4b74-9a45-291fab27524b"
|
"uid": "ef7b4f5b-7011-411b-88c2-4b2681b8ddbe"
|
||||||
},
|
},
|
||||||
"fieldConfig": {
|
"fieldConfig": {
|
||||||
"defaults": {
|
"defaults": {
|
||||||
@ -936,7 +1001,7 @@
|
|||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "grafana-clickhouse-datasource",
|
"type": "grafana-clickhouse-datasource",
|
||||||
"uid": "f70e773b-26c3-4b74-9a45-291fab27524b"
|
"uid": "ef7b4f5b-7011-411b-88c2-4b2681b8ddbe"
|
||||||
},
|
},
|
||||||
"format": 1,
|
"format": 1,
|
||||||
"meta": {
|
"meta": {
|
||||||
@ -962,7 +1027,6 @@
|
|||||||
],
|
],
|
||||||
"refresh": "",
|
"refresh": "",
|
||||||
"schemaVersion": 38,
|
"schemaVersion": 38,
|
||||||
"style": "dark",
|
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"templating": {
|
"templating": {
|
||||||
"list": [
|
"list": [
|
||||||
@ -974,7 +1038,7 @@
|
|||||||
},
|
},
|
||||||
"datasource": {
|
"datasource": {
|
||||||
"type": "grafana-clickhouse-datasource",
|
"type": "grafana-clickhouse-datasource",
|
||||||
"uid": "f70e773b-26c3-4b74-9a45-291fab27524b"
|
"uid": "ef7b4f5b-7011-411b-88c2-4b2681b8ddbe"
|
||||||
},
|
},
|
||||||
"definition": "SELECT DISTINCT program FROM default.log_docker_raw WHERE logdatetime > now() - interval 6 hours;",
|
"definition": "SELECT DISTINCT program FROM default.log_docker_raw WHERE logdatetime > now() - interval 6 hours;",
|
||||||
"hide": 0,
|
"hide": 0,
|
||||||
@ -1085,6 +1149,6 @@
|
|||||||
"timezone": "",
|
"timezone": "",
|
||||||
"title": "Logs + Structured via Query",
|
"title": "Logs + Structured via Query",
|
||||||
"uid": "b445eb43-25d1-4112-b628-3b8acf037f10",
|
"uid": "b445eb43-25d1-4112-b628-3b8acf037f10",
|
||||||
"version": 8,
|
"version": 6,
|
||||||
"weekStart": ""
|
"weekStart": ""
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user