sysom1/deps/4_grafana/mysql-events.json

1135 lines
30 KiB
JSON
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "sysom-mysql",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": "sysom-mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "left",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "semi-dark-red",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "ts"
},
"properties": [
{
"id": "displayName",
"value": "time"
}
]
},
{
"matcher": {
"id": "byName",
"options": "value"
},
"properties": [
{
"id": "displayName",
"value": "description"
}
]
},
{
"matcher": {
"id": "byName",
"options": "root_analyze"
},
"properties": [
{
"id": "displayName",
"value": "root cause analyse"
}
]
},
{
"matcher": {
"id": "byName",
"options": "root_analyze"
},
"properties": [
{
"id": "links",
"value": []
},
{
"id": "mappings",
"value": [
{
"options": {
"无": {
"color": "text",
"index": 0
}
},
"type": "value"
}
]
},
{
"id": "custom.displayMode",
"value": "color-text"
},
{
"id": "links",
"value": [
{
"targetBlank": true,
"title": "",
"url": "../${__data.fields.root_analyz_flag}instance=${__data.fields.instance}"
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "root_analyz_flag"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "time"
},
"properties": [
{
"id": "custom.width",
"value": 160
}
]
},
{
"matcher": {
"id": "byName",
"options": "podId"
},
"properties": [
{
"id": "custom.width",
"value": 314
}
]
},
{
"matcher": {
"id": "byName",
"options": "description"
},
"properties": [
{
"id": "custom.width",
"value": 132
}
]
},
{
"matcher": {
"id": "byName",
"options": "instance"
},
"properties": [
{
"id": "custom.width",
"value": 319
},
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "reason"
},
"properties": [
{
"id": "custom.width",
"value": 410
}
]
}
]
},
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 0
},
"id": 10,
"options": {
"footer": {
"enablePagination": true,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true,
"sortBy": []
},
"pluginVersion": "9.2.2",
"targets": [
{
"dataset": "sysom",
"datasource": "sysom-mysql",
"editorMode": "code",
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT extra, instance,\n CASE \n WHEN JSON_EXTRACT(extra, '$.root_analyz_flag') = 'journal/node?'\n THEN '无'\n ELSE '进一步诊断'\n END AS root_analyze\nFROM sysom.sys_node_log\nWHERE (JSON_EXTRACT(extra, '$.podId') = \"$podId\" OR JSON_EXTRACT(extra, '$.containerId') = \"$containerId\") AND UNIX_TIMESTAMP(create_at) > $__from / 1000 AND UNIX_TIMESTAMP(create_at) < $__to / 1000 AND JSON_EXTRACT(extra, '$.reason') IS NOT NULL AND JSON_EXTRACT(extra, '$.tag_set') = 'mysqld' \nORDER BY ts DESC LIMIT 20\n",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [
{
"name": "extra",
"type": "functionParameter"
}
],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "sys_node_log"
}
],
"title": "Mysql应用相关异常事件",
"transformations": [
{
"disabled": true,
"id": "organize",
"options": {
"excludeByName": {
"app_log": true,
"containerId": true,
"curr": true,
"disk": true,
"extra": false,
"level": true,
"metrics": false,
"os_log": true,
"pid": false,
"root_analyze": false,
"tag_set": false,
"thresh": true,
"unit": true,
"value": false
},
"indexByName": {
"containerId": 7,
"metrics": 5,
"pid": 6,
"podId": 1,
"tag_set": 2,
"ts": 0,
"unit": 4,
"value": 3
},
"renameByName": {
"metrics": "metrics",
"pid": "",
"tag_set": "app name",
"ts": "time",
"unit": "",
"value": "description"
}
}
},
{
"id": "extractFields",
"options": {
"format": "json",
"replace": false,
"source": "extra"
}
},
{
"disabled": true,
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "equal",
"options": {
"value": "mysqld"
}
},
"fieldName": "tag_set"
}
],
"match": "any",
"type": "include"
}
},
{
"disabled": true,
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "isNotNull",
"options": {}
},
"fieldName": "reason"
}
],
"match": "any",
"type": "include"
}
},
{
"id": "organize",
"options": {
"excludeByName": {
"app_log": true,
"containerId": true,
"curr": true,
"disk": true,
"extra": true,
"instance": false,
"level": true,
"metrics": true,
"os_log": true,
"pid": true,
"reason": false,
"root_analyze": false,
"tag_set": true,
"thresh": true,
"unit": true
},
"indexByName": {
"app_log": 9,
"containerId": 7,
"curr": 13,
"disk": 12,
"extra": 16,
"instance": 17,
"level": 8,
"metrics": 4,
"os_log": 11,
"pid": 6,
"podId": 1,
"reason": 10,
"root cause analyze": 15,
"root_analyze": 18,
"tag_set": 5,
"thresh": 14,
"ts": 0,
"unit": 3,
"value": 2
},
"renameByName": {
"podId": "",
"ts": "",
"value": "description"
}
}
},
{
"id": "sortBy",
"options": {
"fields": {},
"sort": [
{
"desc": true,
"field": "time"
}
]
}
}
],
"type": "table"
},
{
"datasource": "sysom-mysql",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "left",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "semi-dark-red",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "value"
},
"properties": [
{
"id": "custom.width",
"value": 408
},
{
"id": "custom.hidden",
"value": false
},
{
"id": "displayName",
"value": "desc"
}
]
},
{
"matcher": {
"id": "byName",
"options": "pid"
},
"properties": [
{
"id": "custom.width",
"value": 123
},
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "podId"
},
"properties": [
{
"id": "custom.width",
"value": 300
}
]
},
{
"matcher": {
"id": "byName",
"options": "tag_set"
},
"properties": [
{
"id": "custom.width",
"value": 110
},
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "ts"
},
"properties": [
{
"id": "custom.width",
"value": 137
},
{
"id": "displayName",
"value": "time"
}
]
},
{
"matcher": {
"id": "byName",
"options": "metrics"
},
"properties": [
{
"id": "custom.width",
"value": 232
},
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "app name"
},
"properties": [
{
"id": "custom.width",
"value": 97
}
]
},
{
"matcher": {
"id": "byName",
"options": "description"
},
"properties": [
{
"id": "custom.width",
"value": 379
}
]
},
{
"matcher": {
"id": "byName",
"options": "time"
},
"properties": [
{
"id": "custom.width",
"value": 156
}
]
},
{
"matcher": {
"id": "byName",
"options": "root cause analyze"
},
"properties": [
{
"id": "links",
"value": [
{
"targetBlank": true,
"title": "根因诊断",
"url": "../${__data.fields.root_analyz_flag}instance=${__data.fields.instance}"
},
{
"targetBlank": true,
"title": "指标关联分析",
"url": "../api/v1/rca/rca_call?timestamp=${__data.fields.ts}&base_item=${__data.fields.metrics}&machine_ip=${__data.fields.instance}"
}
]
},
{
"id": "custom.displayMode",
"value": "color-text"
},
{
"id": "mappings",
"value": [
{
"options": {
"responseTimeAvg": {
"index": 0,
"text": "进一步诊断"
}
},
"type": "value"
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "disk"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "curr"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "thresh"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "extra"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "level"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "unit"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "containerId"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "app_log"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "os_log"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "reason"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "description"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "instance"
},
"properties": [
{
"id": "custom.width",
"value": 407
},
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "desc"
},
"properties": [
{
"id": "custom.width",
"value": 361
}
]
},
{
"matcher": {
"id": "byName",
"options": "root_analyz_flag"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "details"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
}
]
},
"gridPos": {
"h": 13,
"w": 24,
"x": 0,
"y": 12
},
"id": 6,
"options": {
"footer": {
"enablePagination": true,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true,
"sortBy": []
},
"pluginVersion": "9.2.2",
"targets": [
{
"dataset": "sysom",
"datasource": "sysom-mysql",
"editorMode": "code",
"format": "table",
"hide": false,
"rawQuery": true,
"rawSql": "SELECT *, '进一步诊断' as 'root cause analyze' FROM sysom.sys_node_log \nWHERE UNIX_TIMESTAMP(create_at) > (\n SELECT COALESCE(MAX(UNIX_TIMESTAMP(create_at)), '0000-00-00 00:00:00') \n FROM sysom.sys_node_log \n WHERE (JSON_EXTRACT(extra, '$.podId') = \"$podId\" OR JSON_EXTRACT(extra, '$.containerId') = \"$containerId\") \n AND UNIX_TIMESTAMP(create_at) > $__from / 1000 \n AND UNIX_TIMESTAMP(create_at) < $__to / 1000 \n AND JSON_EXTRACT(extra, '$.reason') IS NOT NULL \n AND JSON_EXTRACT(extra, '$.tag_set') = 'mysqld'\n)\nAND UNIX_TIMESTAMP(create_at) > $__from / 1000 \nAND UNIX_TIMESTAMP(create_at) < $__to / 1000 \nAND JSON_EXTRACT(extra, '$.tag_set') = 'mysqld'\nAND JSON_EXTRACT(extra, '$.app_log') IS NULL\nAND (JSON_EXTRACT(extra, '$.podId') = \"$podId\" OR JSON_EXTRACT(extra, '$.containerId') = \"$containerId\")\nORDER BY ts DESC \nLIMIT 20",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [
{
"name": "*",
"type": "functionParameter"
}
],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
},
"table": "sys_node_log"
}
],
"title": "Mysql OS相关异常事件",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"app_log": true,
"containerId": true,
"create_at": true,
"description": true,
"event_type": true,
"extra": false,
"id": true,
"level": true,
"metrics": false,
"os_log": true,
"pid": false,
"reason": true,
"tag_set": false,
"ts": true,
"unit": true,
"update_at": true,
"value": false
},
"indexByName": {
"create_at": 2,
"description": 7,
"event_type": 5,
"extra": 6,
"id": 1,
"instance": 4,
"ts": 0,
"update_at": 3
},
"renameByName": {
"metrics": "metrics",
"pid": "",
"tag_set": "app name",
"ts": "time",
"unit": "",
"value": "description"
}
}
},
{
"id": "extractFields",
"options": {
"format": "json",
"replace": false,
"source": "extra"
}
},
{
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "equal",
"options": {
"value": "mysqld"
}
},
"fieldName": "tag_set"
}
],
"match": "any",
"type": "include"
}
},
{
"disabled": true,
"id": "calculateField",
"options": {
"alias": "root cause analyze",
"binary": {
"left": "metrics",
"operator": "+",
"reducer": "sum",
"right": "metrics"
},
"mode": "reduceRow",
"reduce": {
"include": [
"metrics"
],
"reducer": "allValues"
}
}
},
{
"disabled": true,
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "isNotNull",
"options": {}
},
"fieldName": "app_log"
}
],
"match": "all",
"type": "exclude"
}
},
{
"id": "organize",
"options": {
"excludeByName": {
"app_log": false,
"tag_set": false,
"value": false
},
"indexByName": {
"app_log": 11,
"containerId": 9,
"curr": 15,
"disk": 14,
"extra": 4,
"instance": 1,
"level": 10,
"metrics": 7,
"os_log": 13,
"pid": 3,
"podId": 2,
"reason": 12,
"root cause analyze": 17,
"tag_set": 8,
"thresh": 16,
"ts": 0,
"unit": 6,
"value": 5
},
"renameByName": {}
}
},
{
"id": "sortBy",
"options": {
"fields": {},
"sort": [
{
"desc": true,
"field": "ts"
}
]
}
}
],
"type": "table"
}
],
"refresh": "15s",
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "8c71661b_2abc_4df7_b19a_387a82c1a4d6",
"value": "8c71661b_2abc_4df7_b19a_387a82c1a4d6"
},
"datasource": "sysom-prometheus",
"definition": "label_values(sysom_obser_mysqld_process, podID)",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "podId",
"options": [],
"query": {
"query": "label_values(sysom_obser_mysqld_process, podID)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": false,
"text": "ffc120766e2e",
"value": "ffc120766e2e"
},
"datasource": "sysom-prometheus",
"definition": "label_values(sysom_obser_mysqld_process{podID=\"$podId\"}, containerID)",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "containerId",
"options": [],
"query": {
"query": "label_values(sysom_obser_mysqld_process{podID=\"$podId\"}, containerID)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": false,
"text": "192.168.0.137",
"value": "192.168.0.137"
},
"datasource": "sysom-prometheus",
"definition": "label_values(sysom_obser_mysqld_process{containerID=\"$containerId\"}, exported_instance)",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "hostIp",
"options": [],
"query": {
"query": "label_values(sysom_obser_mysqld_process{containerID=\"$containerId\"}, exported_instance)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"isNone": true,
"selected": false,
"text": "None",
"value": ""
},
"datasource": "sysom-prometheus",
"definition": "label_values(sysom_obser_app_rt_ntopo{PodUUID=\"$podId\"}, Pod)",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "podname",
"options": [],
"query": {
"query": "label_values(sysom_obser_app_rt_ntopo{PodUUID=\"$podId\"}, Pod)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"15s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "app-mysql-events",
"uid": "Ub__1x3Vz",
"version": 98,
"weekStart": ""
}