sysom1/deps/4_grafana/sysom-appobserver-nginx-eve...

452 lines
17 KiB
JSON

{
"dashboard": {
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": false,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"panels": [],
"title": "\u5f02\u5e38\u4e8b\u4ef6\u8be6\u60c5",
"type": "row"
},
{
"datasource": "sysom-mysql",
"description": "nginx http\u5f02\u5e38\u8bf7\u6c42\u8be6\u60c5",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red"
}
]
},
"unit": "\u00b5s"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "ts"
},
"properties": [
{
"id": "displayName",
"value": "time"
}
]
},
{
"matcher": {
"id": "byName",
"options": "labels"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "instance"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "masterPid"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "diagId"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "status"
},
"properties": [
{
"id": "unit",
"value": "string"
},
{
"id": "custom.width",
"value": 166
}
]
},
{
"matcher": {
"id": "byName",
"options": "requestTime"
},
"properties": [
{
"id": "unit",
"value": "ms"
},
{
"id": "custom.width",
"value": 158
}
]
},
{
"matcher": {
"id": "byName",
"options": "upstreamResponseTime"
},
"properties": [
{
"id": "unit",
"value": "ms"
},
{
"id": "custom.width",
"value": 241
}
]
},
{
"matcher": {
"id": "byName",
"options": "upstreamAddr"
},
"properties": [
{
"id": "custom.width",
"value": 191
}
]
},
{
"matcher": {
"id": "byName",
"options": "\u65f6\u95f4"
},
"properties": [
{
"id": "custom.width",
"value": 190
}
]
},
{
"matcher": {
"id": "byName",
"options": "remoteAddr"
},
"properties": [
{
"id": "custom.width",
"value": 173
}
]
},
{
"matcher": {
"id": "byName",
"options": "request"
},
"properties": [
{
"id": "custom.width",
"value": 287
}
]
},
{
"matcher": {
"id": "byName",
"options": "reason"
},
"properties": [
{
"id": "custom.width",
"value": 259
}
]
},
{
"matcher": {
"id": "byName",
"options": "app_diag"
},
"properties": [
{
"id": "displayName",
"value": "applicationDiagnosis"
},
{
"id": "custom.displayMode",
"value": "color-text"
},
{
"id": "links",
"value": [
{
"targetBlank": true,
"title": "",
"url": "http://sysom_test.qjm253.cn/diagnose/link/procdiag?instance=${instance}&ipport=${__data.fields.upstreamAddr}&time=30"
}
]
}
]
},
{
"matcher": {
"id": "byName",
"options": "diag"
},
"properties": [
{
"id": "custom.hidden",
"value": true
}
]
},
{
"matcher": {
"id": "byName",
"options": "applicationDiagnosis"
},
"properties": [
{
"id": "custom.width",
"value": 243
}
]
},
{
"matcher": {
"id": "byName",
"options": "time"
},
"properties": [
{
"id": "custom.width",
"value": 272
}
]
}
]
},
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 1
},
"id": 6,
"options": {
"footer": {
"enablePagination": true,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true,
"sortBy": []
},
"pluginVersion": "9.2.2",
"targets": [
{
"datasource": "sysom-mysql",
"editorMode": "code",
"expr": "",
"format": "table",
"legendFormat": "__auto",
"range": true,
"rawQuery": true,
"rawSql": "SELECT labels, instance,\n CASE \n WHEN JSON_EXTRACT(labels, '$.diag') = 'true'\n THEN '\u5e94\u7528\u6296\u52a8\u8bca\u65ad'\n ELSE '\u65e0'\n END AS app_diag\nFROM sysom.sys_alert_data\nWHERE instance = \"$instance\" AND JSON_EXTRACT(labels, '$.masterPid') = \"$masterPid\" AND UNIX_TIMESTAMP(created_at) > $__from / 1000 AND UNIX_TIMESTAMP(created_at) < $__to / 1000\nORDER BY alert_time DESC LIMIT 20\n",
"refId": "A",
"sql": {
"columns": [
{
"parameters": [],
"type": "function"
}
],
"groupBy": [
{
"property": {
"type": "string"
},
"type": "groupBy"
}
],
"limit": 50
}
}
],
"title": "\u5f02\u5e38\u8bf7\u6c42\u8be6\u60c5",
"transformations": [
{
"id": "extractFields",
"options": {
"source": "labels"
}
},
{
"id": "organize",
"options": {
"excludeByName": {},
"indexByName": {
"app_diag": 13,
"diag": 12,
"diagId": 9,
"instance": 1,
"labels": 0,
"masterPid": 8,
"reason": 11,
"remoteAddr": 3,
"request": 5,
"requestTime": 6,
"status": 10,
"ts": 2,
"upstreamAddr": 4,
"upstreamResponseTime": 7
},
"renameByName": {}
}
}
],
"type": "table"
}
],
"refresh": "30s",
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "192.168.0.77",
"value": "192.168.0.77"
},
"datasource": "sysom-prometheus",
"definition": "label_values(sysom_nginx_main_metrics, exported_instance)",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "instance",
"options": [],
"query": {
"query": "label_values(sysom_nginx_main_metrics, exported_instance)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": false,
"text": "809",
"value": "809"
},
"datasource": "sysom-prometheus",
"definition": "label_values(sysom_nginx_main_metrics, masterPid)",
"hide": 0,
"includeAll": false,
"multi": false,
"name": "masterPid",
"options": [],
"query": {
"query": "label_values(sysom_nginx_main_metrics, masterPid)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "nginx-event",
"uid": "HtuWUeSSz",
"version": 25,
"weekStart": ""
}
}