331 lines
7.6 KiB
JSON
331 lines
7.6 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": null,
|
|
"links": [],
|
|
"panels": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "P8E80F9AEF21F6940"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 12,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"id": 1,
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "table",
|
|
"placement": "bottom"
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi"
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "P8E80F9AEF21F6940"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "sum(count_over_time({container=\"ppanel-server\"} |~ \"${user_id:raw}\" |~ \"${email:raw}\" |~ \"${order:raw}\" |~ \"${keyword:raw}\" |~ \"${level:raw}\" [5m]))",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Matched Log Volume",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "P8E80F9AEF21F6940"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 7,
|
|
"w": 12,
|
|
"x": 12,
|
|
"y": 0
|
|
},
|
|
"id": 2,
|
|
"options": {
|
|
"legend": {
|
|
"displayMode": "table",
|
|
"placement": "bottom"
|
|
},
|
|
"tooltip": {
|
|
"mode": "multi"
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "P8E80F9AEF21F6940"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "sum(count_over_time({container=\"ppanel-server\"} |~ \"${user_id:raw}\" |~ \"${email:raw}\" |~ \"${order:raw}\" |~ \"${keyword:raw}\" |~ \"(?i)(error|panic|fatal)\" [5m]))",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Matched Error Volume",
|
|
"type": "timeseries"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "P8E80F9AEF21F6940"
|
|
},
|
|
"gridPos": {
|
|
"h": 12,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 7
|
|
},
|
|
"id": 3,
|
|
"options": {
|
|
"dedupStrategy": "none",
|
|
"enableLogDetails": true,
|
|
"prettifyLogMessage": false,
|
|
"showCommonLabels": false,
|
|
"showLabels": true,
|
|
"showTime": true,
|
|
"sortOrder": "Descending",
|
|
"wrapLogMessage": true
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "P8E80F9AEF21F6940"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "{container=\"ppanel-server\"} |~ \"${user_id:raw}\" |~ \"${email:raw}\" |~ \"${order:raw}\" |~ \"${keyword:raw}\" |~ \"${level:raw}\"",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Filtered Server Logs",
|
|
"type": "logs"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "P8E80F9AEF21F6940"
|
|
},
|
|
"gridPos": {
|
|
"h": 10,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 19
|
|
},
|
|
"id": 4,
|
|
"options": {
|
|
"dedupStrategy": "none",
|
|
"enableLogDetails": true,
|
|
"prettifyLogMessage": false,
|
|
"showCommonLabels": false,
|
|
"showLabels": true,
|
|
"showTime": true,
|
|
"sortOrder": "Descending",
|
|
"wrapLogMessage": true
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "P8E80F9AEF21F6940"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "{container=\"ppanel-server\"} |~ \"${user_id:raw}\" |~ \"${email:raw}\" |~ \"${order:raw}\" |~ \"${keyword:raw}\" |~ \"(?i)(error|panic|fatal)\"",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Filtered Server Errors",
|
|
"type": "logs"
|
|
}
|
|
],
|
|
"refresh": "30s",
|
|
"schemaVersion": 42,
|
|
"tags": [
|
|
"ppanel",
|
|
"logs",
|
|
"server",
|
|
"loki"
|
|
],
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"current": {
|
|
"selected": false,
|
|
"text": ".",
|
|
"value": "."
|
|
},
|
|
"description": "输入用户 ID;默认 . 表示不过滤",
|
|
"hide": 0,
|
|
"label": "用户ID",
|
|
"name": "user_id",
|
|
"options": [],
|
|
"query": ".",
|
|
"skipUrlSync": false,
|
|
"type": "textbox"
|
|
},
|
|
{
|
|
"current": {
|
|
"selected": false,
|
|
"text": ".",
|
|
"value": "."
|
|
},
|
|
"description": "输入邮箱或邮箱片段;默认 . 表示不过滤",
|
|
"hide": 0,
|
|
"label": "邮箱",
|
|
"name": "email",
|
|
"options": [],
|
|
"query": ".",
|
|
"skipUrlSync": false,
|
|
"type": "textbox"
|
|
},
|
|
{
|
|
"current": {
|
|
"selected": false,
|
|
"text": ".",
|
|
"value": "."
|
|
},
|
|
"description": "输入订单号/支付单号/交易号片段;默认 . 表示不过滤",
|
|
"hide": 0,
|
|
"label": "订单",
|
|
"name": "order",
|
|
"options": [],
|
|
"query": ".",
|
|
"skipUrlSync": false,
|
|
"type": "textbox"
|
|
},
|
|
{
|
|
"current": {
|
|
"selected": true,
|
|
"text": "All",
|
|
"value": "."
|
|
},
|
|
"description": "日志等级",
|
|
"hide": 0,
|
|
"includeAll": false,
|
|
"label": "等级",
|
|
"multi": false,
|
|
"name": "level",
|
|
"options": [
|
|
{
|
|
"selected": true,
|
|
"text": "All",
|
|
"value": "."
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "debug",
|
|
"value": "debug"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "info",
|
|
"value": "info"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "warn",
|
|
"value": "warn"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "error",
|
|
"value": "error"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "slow",
|
|
"value": "slow"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "panic",
|
|
"value": "panic"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "fatal",
|
|
"value": "fatal"
|
|
}
|
|
],
|
|
"query": "All : .,debug,info,warn,error,slow,panic,fatal",
|
|
"queryValue": "",
|
|
"skipUrlSync": false,
|
|
"type": "custom"
|
|
},
|
|
{
|
|
"current": {
|
|
"selected": false,
|
|
"text": ".",
|
|
"value": "."
|
|
},
|
|
"description": "任意关键字;默认 . 表示不过滤",
|
|
"hide": 0,
|
|
"label": "关键字",
|
|
"name": "keyword",
|
|
"options": [],
|
|
"query": ".",
|
|
"skipUrlSync": false,
|
|
"type": "textbox"
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"from": "now-7d",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {},
|
|
"timezone": "browser",
|
|
"title": "PPanel Server Logs",
|
|
"uid": "ppanel-server-logs",
|
|
"version": 5,
|
|
"weekStart": ""
|
|
}
|