diff --git a/internal/export/dashboard/redis/redis__zh.json b/internal/export/dashboard/redis/redis__zh.json
new file mode 100644
index 0000000000..f482a3df1c
--- /dev/null
+++ b/internal/export/dashboard/redis/redis__zh.json
@@ -0,0 +1,7166 @@
+{
+ "title": "redis-dashborad",
+ "dashboardType": "CUSTOM",
+ "dashboardExtend": {
+ "groupUnfoldStatus": {
+ "主从": false,
+ "内存": true,
+ "性能": true,
+ "总览": true,
+ "日志": false,
+ "集群": false,
+ "持久化": false,
+ "Bigkey Hotkey": true
+ }
+ },
+ "dashboardMapping": [],
+ "dashboardOwnerType": "node",
+ "iconSet": {
+ "url": "http://df-static-res.huazhucorp.com/dataflux-template/dashboard/zh/redis/redis.png",
+ "icon": "http://df-static-res.huazhucorp.com/dataflux-template/dashboard/zh/redis/icon.svg"
+ },
+ "dashboardBindSet": [],
+ "thumbnail": "",
+ "tagInfo": [],
+ "summary": "",
+ "main": {
+ "vars": [
+ {
+ "name": "主机名",
+ "seq": 0,
+ "datasource": "dataflux",
+ "code": "host",
+ "type": "QUERY",
+ "definition": {
+ "tag": "",
+ "field": "",
+ "value": "show_tag_value(from=['redis_client'], keyin=['host'])[5m]",
+ "metric": "",
+ "object": "",
+ "defaultVal": {
+ "label": "",
+ "value": ""
+ }
+ },
+ "valueSort": "default",
+ "hide": 0,
+ "isHiddenAsterisk": 0,
+ "multiple": true,
+ "includeStar": true
+ },
+ {
+ "name": "server",
+ "seq": 1,
+ "datasource": "dataflux",
+ "code": "server",
+ "type": "QUERY",
+ "definition": {
+ "tag": "",
+ "field": "",
+ "value": "show_tag_value(from=['redis_client'], keyin=['server']){`host`='#{host}'}[5m]",
+ "metric": "",
+ "object": "",
+ "defaultVal": {
+ "label": "",
+ "value": ""
+ }
+ },
+ "valueSort": "asc",
+ "hide": 0,
+ "isHiddenAsterisk": 0,
+ "multiple": true,
+ "includeStar": true
+ },
+ {
+ "name": "db",
+ "seq": 2,
+ "datasource": "dataflux",
+ "code": "db",
+ "type": "QUERY",
+ "definition": {
+ "tag": "",
+ "field": "",
+ "value": "show_tag_value(from=['redis_db'], keyin=['db_name']){`server`='#{server}'}[5m]",
+ "metric": "",
+ "object": "",
+ "defaultVal": {
+ "label": "",
+ "value": ""
+ }
+ },
+ "valueSort": "asc",
+ "hide": 0,
+ "isHiddenAsterisk": 0,
+ "multiple": true,
+ "includeStar": true
+ }
+ ],
+ "charts": [
+ {
+ "extend": {
+ "settings": {
+ "mark": {
+ "axis": "x",
+ "data": [],
+ "type": "area"
+ },
+ "alias": [
+ {
+ "key": "used_cpu_sys",
+ "name": "used_cpu_sys",
+ "alias": "{{server}}-used_cpu_sys"
+ },
+ {
+ "key": "used_cpu_user",
+ "name": "used_cpu_user",
+ "alias": "{{server}}-used_cpu_user"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "density": "medium",
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "areaLine",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "compareTitle": "",
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "compareColors": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "legendPostion": "bottom",
+ "maxPointCount": 360,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "compareColorsDark": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "onlyShowGroupName": false,
+ "compareColorsLight": {
+ "dayCompare": "rgba(11,11,12,0.5)",
+ "hourCompare": "#0B0B0C",
+ "weekCompare": "rgba(11,11,12,0.3)",
+ "monthCompare": "rgba(11,11,12,0.12)"
+ },
+ "tableSortMetricName": "核心态消耗的 CPU 时间",
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": true
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "Redis 消耗CPU时间",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 0,
+ "y": 28
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(`used_cpu_sys`) { `host` = '#{host}' and `server` = '#{server}' }[:::irate] BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "dql",
+ "alias": "",
+ "field": "used_cpu_sys",
+ "index": "",
+ "rollup": "irate",
+ "fillNum": null,
+ "filters": [
+ {
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "op": "=",
+ "name": "server",
+ "type": "",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "indexes": [],
+ "labelOp": "",
+ "funcList": [],
+ "interval": "",
+ "fieldFunc": "",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "dataSourceFunc": ""
+ },
+ "disabled": false,
+ "datasource": "dataflux"
+ },
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(`used_cpu_user`) { `host` = '#{host}' and `server` = '#{server}' }[:::irate] BY `server`",
+ "code": "B",
+ "fill": null,
+ "type": "dql",
+ "alias": "",
+ "field": "used_cpu_user",
+ "index": "",
+ "rollup": "irate",
+ "fillNum": null,
+ "filters": [
+ {
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "op": "=",
+ "name": "server",
+ "type": "",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "indexes": [],
+ "labelOp": "",
+ "funcList": [],
+ "interval": "",
+ "fieldFunc": "",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "dataSourceFunc": ""
+ },
+ "disabled": false,
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "1"
+ ],
+ "bgColor": "#F97575",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": ">="
+ },
+ {
+ "value": [
+ "1"
+ ],
+ "bgColor": "#63DBAD",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "<"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false,
+ "fixedGroupByTime": null
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "拒绝的连接数",
+ "pos": {
+ "h": 10,
+ "w": 4,
+ "x": 8,
+ "y": 7
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "series_sum(\"M::`redis_info`:(last(`rejected_connections`) AS `拒绝的连接数`) { `host` = '#{host}' and `server` = '#{server}' } BY `host`\")",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "拒绝的连接数",
+ "field": "rejected_connections",
+ "filters": [
+ {
+ "id": "7b0a2740-87b7-11eb-a503-75529ab0d97c",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}"
+ },
+ {
+ "id": "b6742c90-84a2-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "host"
+ ],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [
+ {
+ "args": [],
+ "name": "series_sum"
+ }
+ ],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "mark": {
+ "axis": "x",
+ "data": [],
+ "type": "area"
+ },
+ "alias": [],
+ "units": [
+ {
+ "key": "已使用内存",
+ "name": "已使用内存",
+ "unit": "",
+ "units": [
+ "digital",
+ "b"
+ ]
+ }
+ ],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "density": "medium",
+ "showLine": false,
+ "unitType": "custom",
+ "chartType": "areaLine",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "compareTitle": "",
+ "connectNulls": true,
+ "legendValues": [
+ "max",
+ "last",
+ "avg"
+ ],
+ "timeInterval": "10s",
+ "compareColors": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "legendPostion": "bottom",
+ "maxPointCount": 360,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "compareColorsDark": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "onlyShowGroupName": false,
+ "compareColorsLight": {
+ "dayCompare": "rgba(11,11,12,0.5)",
+ "hourCompare": "#0B0B0C",
+ "weekCompare": "rgba(11,11,12,0.3)",
+ "monthCompare": "rgba(11,11,12,0.12)"
+ },
+ "tableSortMetricName": "redis_used_memory",
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "内存"
+ },
+ "name": "Redis存储使用内存",
+ "pos": {
+ "h": 15,
+ "w": 12,
+ "x": 0,
+ "y": 0
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(avg(`used_memory`) AS `已使用内存`) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "已使用内存",
+ "field": "used_memory",
+ "filters": [
+ {
+ "id": "41d7dd50-87ad-11eb-98f1-11984c8fe9fb",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}"
+ },
+ {
+ "id": "c86b46d0-84b7-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "mark": {
+ "axis": "x",
+ "data": [],
+ "type": "area"
+ },
+ "alias": [
+ {
+ "key": "avg(rdb_changes_since_last_save)",
+ "name": "avg(rdb_changes_since_last_save)",
+ "alias": "{{server}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "density": "medium",
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "areaLine",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [
+ "digital",
+ "b"
+ ],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "compareTitle": "",
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "10s",
+ "compareColors": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "legendPostion": "bottom",
+ "maxPointCount": 360,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "compareColorsDark": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "onlyShowGroupName": false,
+ "compareColorsLight": {
+ "dayCompare": "rgba(11,11,12,0.5)",
+ "hourCompare": "#0B0B0C",
+ "weekCompare": "rgba(11,11,12,0.3)",
+ "monthCompare": "rgba(11,11,12,0.12)"
+ },
+ "tableSortMetricName": "最近转储更改数量",
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "持久化"
+ },
+ "name": "最近转储更改数量",
+ "pos": {
+ "h": 13,
+ "w": 8,
+ "x": 16,
+ "y": 0
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(avg(`rdb_changes_since_last_save`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "type": "simple",
+ "alias": "",
+ "field": "rdb_changes_since_last_save",
+ "filters": [
+ {
+ "id": "bd8ba240-87b4-11eb-a503-75529ab0d97c",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}"
+ },
+ {
+ "id": "141b3460-84bc-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "mark": {
+ "axis": "x",
+ "data": [],
+ "type": "area"
+ },
+ "alias": [
+ {
+ "key": "avg(blocked_clients)",
+ "name": "avg(blocked_clients)",
+ "alias": "{{server}}-blocked_clients"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "density": "medium",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "areaLine",
+ "fixedTime": "",
+ "isPercent": false,
+ "lineColor": "#c23531",
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "compareColors": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "legendPostion": "bottom",
+ "maxPointCount": 360,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "compareColorsDark": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "onlyShowGroupName": false,
+ "compareColorsLight": {
+ "dayCompare": "rgba(11,11,12,0.5)",
+ "hourCompare": "#0B0B0C",
+ "weekCompare": "rgba(11,11,12,0.3)",
+ "monthCompare": "rgba(11,11,12,0.12)"
+ },
+ "tableSortMetricName": "等待阻塞命令的客户端连接数",
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "等待阻塞命令的客户端连接数",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 12,
+ "y": 45
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(avg(`blocked_clients`)) { `host` = '#{host}' and `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "blocked_clients",
+ "filters": [
+ {
+ "id": "e82f7b90-87ad-11eb-98f1-11984c8fe9fb",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}"
+ },
+ {
+ "id": "615e18a0-84ad-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "65ae38e0-84ad-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "mark": {
+ "axis": "x",
+ "data": [],
+ "type": "area"
+ },
+ "alias": [
+ {
+ "key": "内存碎片率",
+ "name": "内存碎片率",
+ "alias": "{{server}}-mem_fragmentation_ratio"
+ }
+ ],
+ "units": [
+ {
+ "key": "内存碎片率",
+ "name": "内存碎片率",
+ "unit": "",
+ "units": [
+ "percent",
+ "percent_decimal"
+ ]
+ }
+ ],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "density": "medium",
+ "showLine": false,
+ "unitType": "custom",
+ "chartType": "areaLine",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "compareTitle": "",
+ "connectNulls": true,
+ "legendValues": [
+ "max",
+ "avg",
+ "last"
+ ],
+ "timeInterval": "10s",
+ "compareColors": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "legendPostion": "bottom",
+ "maxPointCount": 360,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "compareColorsDark": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "onlyShowGroupName": false,
+ "compareColorsLight": {
+ "dayCompare": "rgba(11,11,12,0.5)",
+ "hourCompare": "#0B0B0C",
+ "weekCompare": "rgba(11,11,12,0.3)",
+ "monthCompare": "rgba(11,11,12,0.12)"
+ },
+ "tableSortMetricName": "redis_mem_fragmentation_ratio",
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "内存"
+ },
+ "name": "内存碎片率",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 12,
+ "y": 15
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(avg(`mem_fragmentation_ratio`) AS `内存碎片率`) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "内存碎片率",
+ "field": "mem_fragmentation_ratio",
+ "filters": [
+ {
+ "id": "fa71d1a0-87ac-11eb-98f1-11984c8fe9fb",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}"
+ },
+ {
+ "id": "78410d00-84b9-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [
+ {
+ "key": "redis_latest_fork_usec",
+ "name": "redis_latest_fork_usec",
+ "unit": "毫秒"
+ }
+ ],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "100"
+ ],
+ "bgColor": "#63DBAD",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "<="
+ },
+ {
+ "value": [
+ "100"
+ ],
+ "bgColor": "#FFDA43",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": ">"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "custom",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#c23531",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "1s",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "客户端连接数",
+ "pos": {
+ "h": 10,
+ "w": 4,
+ "x": 0,
+ "y": 7
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "series_sum(\"M::`redis_info`:(last(`connected_clients`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`\")",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "connected_clients",
+ "filters": [
+ {
+ "id": "e27b0900-87b0-11eb-98f1-11984c8fe9fb",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}"
+ },
+ {
+ "id": "a48c6f10-84a2-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [
+ {
+ "args": [],
+ "name": "series_sum"
+ }
+ ],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "mark": {
+ "axis": "x",
+ "data": [],
+ "type": "area"
+ },
+ "alias": [],
+ "units": [
+ {
+ "key": "A / (A + B)",
+ "name": "A / (A + B)",
+ "unit": "",
+ "units": [
+ "percent",
+ "percent_decimal"
+ ]
+ }
+ ],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "density": "medium",
+ "showLine": false,
+ "unitType": "custom",
+ "chartType": "areaLine",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "compareTitle": "",
+ "connectNulls": true,
+ "legendValues": "",
+ "timeInterval": "10s",
+ "compareColors": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "legendPostion": "none",
+ "maxPointCount": 360,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "compareColorsDark": {
+ "dayCompare": "rgba(213,217,226,0.5)",
+ "hourCompare": "#D5D9E2",
+ "weekCompare": "rgba(213,217,226,0.25)",
+ "monthCompare": "rgba(213,217,226,0.12)"
+ },
+ "onlyShowGroupName": false,
+ "compareColorsLight": {
+ "dayCompare": "rgba(11,11,12,0.5)",
+ "hourCompare": "#0B0B0C",
+ "weekCompare": "rgba(11,11,12,0.3)",
+ "monthCompare": "rgba(11,11,12,0.12)"
+ },
+ "tableSortMetricName": "命中",
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "B"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "缓存命中率",
+ "pos": {
+ "h": 14,
+ "w": 12,
+ "x": 12,
+ "y": 0
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "eval(A/(A+B), A=\"M::`redis_info`:(avg(`keyspace_hits`) AS `命中`) { `host` = '#{host}' and `server` = '#{server}' } BY `server`\", B=\"M::`redis_info`:(avg(`keyspace_misses`) AS `命中`) { `host` = '#{host}' and `server` = '#{server}' } BY `server`\")",
+ "code": "B",
+ "type": "expression",
+ "alias": "",
+ "children": [
+ {
+ "q": "M::`redis_info`:(avg(`keyspace_hits`) AS `命中`) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "命中",
+ "field": "keyspace_hits",
+ "fillNum": null,
+ "filters": [
+ {
+ "id": "d90a6770-84a6-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "d90a8e80-84a6-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "labelOp": "",
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": ""
+ },
+ {
+ "q": "M::`redis_info`:(avg(`keyspace_misses`) AS `命中`) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "B",
+ "fill": null,
+ "type": "simple",
+ "alias": "命中",
+ "field": "keyspace_misses",
+ "fillNum": null,
+ "filters": [
+ {
+ "id": "d975fa80-84a6-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "d975fa81-84a6-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "labelOp": "",
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": ""
+ }
+ ],
+ "funcList": [],
+ "expression": "A/(A+B)"
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "最近RDB保存操作持续时间",
+ "name": "最近RDB保存操作持续时间",
+ "alias": "{{server}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false,
+ "fixedGroupByTime": null
+ },
+ "group": {
+ "name": "持久化"
+ },
+ "name": "最近RDB保存操作持续时间",
+ "pos": {
+ "h": 13,
+ "w": 8,
+ "x": 8,
+ "y": 0
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(avg(`rdb_last_bgsave_time_sec`) AS `最近RDB保存操作持续时间`) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "最近RDB保存操作持续时间",
+ "field": "rdb_last_bgsave_time_sec",
+ "fillNum": null,
+ "filters": [
+ {
+ "id": "aae12a80-8f21-11ee-a614-056bae4f0072",
+ "op": "=",
+ "name": "host",
+ "logic": "and",
+ "value": "#{host}"
+ },
+ {
+ "id": "cc153f30-84bb-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "labelOp": "",
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "avg(rdb_bgsave_in_progress)",
+ "name": "avg(rdb_bgsave_in_progress)",
+ "alias": "{{server}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "max",
+ "min",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false,
+ "fixedGroupByTime": null
+ },
+ "group": {
+ "name": "持久化"
+ },
+ "name": "是否在进行bgsave操作",
+ "pos": {
+ "h": 13,
+ "w": 8,
+ "x": 0,
+ "y": 0
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(avg(`rdb_bgsave_in_progress`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "rdb_bgsave_in_progress",
+ "filters": [
+ {
+ "id": "e27b0900-87b0-11eb-98f1-11984c8fe9fb",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}"
+ },
+ {
+ "id": "9ec5f920-84bb-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "links": [],
+ "settings": {
+ "url": "https://static.guance.com/zhuyun-docs/integration-doc-src/covers/redis.png",
+ "type": "contain",
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "fixedTime": "",
+ "showTitle": true,
+ "titleDesc": "",
+ "timeInterval": "default",
+ "isTimeInterval": false,
+ "backgroundStyle": {
+ "background-size": "contain"
+ },
+ "showFieldMapping": false
+ },
+ "isRefresh": false
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "redis",
+ "pos": {
+ "h": 7,
+ "w": 2,
+ "x": 0,
+ "y": 0
+ },
+ "type": "picture",
+ "queries": []
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "unitType": "global",
+ "fixedTime": "",
+ "showTitle": true,
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "showFieldMapping": false
+ }
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "说明",
+ "pos": {
+ "h": 7,
+ "w": 22,
+ "x": 2,
+ "y": 0
+ },
+ "type": "text",
+ "queries": [
+ {
+ "name": "",
+ "query": {
+ "content": "Redis 监控视图显示 Redis 实例运行状态指标,例如客户端连接数、副本连接数、客户端最大链接时长等多种指标,帮助监控分析 Redis 各种异常情况。
https://docs.guance.com/datakit/redis/"
+ }
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "last(value_length)",
+ "name": "last(value_length)",
+ "alias": "length"
+ }
+ ],
+ "units": [
+ {
+ "key": "last(value_length)",
+ "name": "last(value_length)",
+ "unit": "",
+ "units": [
+ "digital",
+ "b"
+ ]
+ }
+ ],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "pageSize": 0,
+ "unitType": "custom",
+ "fixedTime": "",
+ "precision": "2",
+ "queryMode": "toGroupColumn",
+ "showTitle": true,
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "showColumns": [],
+ "valMappings": [],
+ "aliasVersion": 2,
+ "timeInterval": "1s",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "table",
+ "showFieldMapping": false,
+ "valColorMappings": [],
+ "mainMeasurementSort": "top",
+ "mainMeasurementLimit": 20,
+ "openThousandsSeparator": false,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": true
+ },
+ "group": {
+ "name": "日志"
+ },
+ "name": "Bigkey",
+ "pos": {
+ "h": 18,
+ "w": 12,
+ "x": 0,
+ "y": 18
+ },
+ "type": "table",
+ "queries": [
+ {
+ "name": "",
+ "type": "table",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "L('default')::`redis_bigkey`:(last(`value_length`)) { `server` = '#{server}' and `host` = '#{host}' } BY `key`, `key_type`",
+ "code": "A",
+ "fill": "",
+ "type": "simple",
+ "alias": "",
+ "field": "value_length",
+ "search": "",
+ "filters": [
+ {
+ "id": "b92d3340-84bc-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ },
+ {
+ "id": "bcc0e150-84bc-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "key",
+ "key_type"
+ ],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "long",
+ "namespace": "logging",
+ "dataSource": "redis_bigkey",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "default"
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "pageSize": 0,
+ "unitType": "global",
+ "fixedTime": "",
+ "precision": "2",
+ "queryMode": "toGroupColumn",
+ "showTitle": true,
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "showColumns": [],
+ "valMappings": [],
+ "timeInterval": "1s",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "table",
+ "showFieldMapping": false,
+ "valColorMappings": [],
+ "mainMeasurementSort": "top",
+ "mainMeasurementLimit": 20,
+ "openThousandsSeparator": false,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "日志"
+ },
+ "name": "Hotkey",
+ "pos": {
+ "h": 18,
+ "w": 12,
+ "x": 12,
+ "y": 0
+ },
+ "type": "table",
+ "queries": [
+ {
+ "name": "",
+ "type": "table",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "L('default')::`redis_hotkey`:(last(`key_count`)) { `host` = '#{host}' and `server` = '#{server}' } BY `key`",
+ "code": "A",
+ "fill": "",
+ "type": "simple",
+ "alias": "",
+ "field": "key_count",
+ "search": "",
+ "filters": [
+ {
+ "id": "db01efb0-84bc-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "dd75fcf0-84bc-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "key"
+ ],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "logging",
+ "dataSource": "redis_hotkey",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "default"
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "max": 100,
+ "min": 0,
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ 20
+ ],
+ "lineColor": "#498BFE",
+ "operation": "<="
+ },
+ {
+ "value": [
+ 80
+ ],
+ "lineColor": "#41CEC7",
+ "operation": "<="
+ },
+ {
+ "value": [
+ 100
+ ],
+ "lineColor": "#F97575",
+ "operation": "<="
+ }
+ ],
+ "unitType": "global",
+ "fixedTime": "",
+ "showTitle": true,
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "gauge",
+ "showFieldMapping": false
+ },
+ "fixedTime": "",
+ "isRefresh": false,
+ "fixedGroupByTime": null
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "内存使用率",
+ "pos": {
+ "h": 20,
+ "w": 8,
+ "x": 16,
+ "y": 7
+ },
+ "type": "gauge",
+ "queries": [
+ {
+ "name": "",
+ "type": "gauge",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "eval(A/B*100, A=\"M::`redis_info`:(avg(`used_memory`)) { `host` = '#{host}' }\", B=\"M::`redis_info`:(avg(`maxmemory`)) { `host` = '#{host}' }\")",
+ "code": "A",
+ "type": "expression",
+ "alias": "",
+ "children": [
+ {
+ "q": "M::`redis_info`:(avg(`used_memory`)) { `host` = '#{host}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "used_memory",
+ "fillNum": null,
+ "filters": [
+ {
+ "id": "6821f2a0-849a-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "labelOp": "",
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": ""
+ },
+ {
+ "q": "M::`redis_info`:(avg(`maxmemory`)) { `host` = '#{host}' }",
+ "code": "B",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "maxmemory",
+ "filters": [
+ {
+ "id": "6e657e70-849a-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ }
+ ],
+ "funcList": [],
+ "expression": "A/B*100"
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "90"
+ ],
+ "bgColor": "#63DBAD",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": ">="
+ },
+ {
+ "value": [
+ "75"
+ ],
+ "bgColor": "#F97575",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "<"
+ },
+ {
+ "value": [
+ 75,
+ 90
+ ],
+ "bgColor": "#FFDA43",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "between"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [
+ "percent",
+ "percent"
+ ],
+ "isSampling": false,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "缓存命中率",
+ "pos": {
+ "h": 10,
+ "w": 4,
+ "x": 4,
+ "y": 7
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "eval(A/(A+B)*100, A=\"M::`redis_info`:(avg(`keyspace_hits`)) { `host` = '#{host}' and `server` = '#{server}' }\", B=\"M::`redis_info`:(avg(`keyspace_misses`)) { `host` = '#{host}' and `server` = '#{server}' }\")",
+ "code": "A",
+ "type": "expression",
+ "alias": "",
+ "children": [
+ {
+ "q": "M::`redis_info`:(avg(`keyspace_hits`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "keyspace_hits",
+ "filters": [
+ {
+ "id": "20c17720-8498-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "ab8bf7e0-84a2-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ {
+ "q": "M::`redis_info`:(avg(`keyspace_misses`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "B",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "keyspace_misses",
+ "filters": [
+ {
+ "id": "254614e0-8498-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "aecfd840-84a2-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ }
+ ],
+ "funcList": [],
+ "expression": "A/(A+B)*100"
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "0"
+ ],
+ "bgColor": "#63DBAD",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": ">"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false,
+ "fixedGroupByTime": null
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "Redis keys",
+ "pos": {
+ "h": 10,
+ "w": 4,
+ "x": 4,
+ "y": 17
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "series_sum(\"M::`redis_db`:(last(`keys`)) { `host` = '#{host}' and `server` = '#{server}' and `db_name` = '#{db}' } BY `server`\")",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "keys",
+ "filters": [
+ {
+ "id": "f0c7dc20-8498-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "cae57b20-84a2-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ },
+ {
+ "id": "f90fc270-84a3-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "db_name",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{db}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_db",
+ "queryFuncs": [
+ {
+ "args": [],
+ "name": "series_sum"
+ }
+ ],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "1"
+ ],
+ "bgColor": "#F97575",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": ">="
+ },
+ {
+ "value": [
+ "1"
+ ],
+ "bgColor": "#63DBAD",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "<"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "阻塞连接数",
+ "pos": {
+ "h": 10,
+ "w": 4,
+ "x": 12,
+ "y": 7
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "series_sum(\"M::`redis_info`:(last(`blocked_clients`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`\")",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "blocked_clients",
+ "filters": [
+ {
+ "id": "9bb56b50-849b-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "bc3541f0-84a2-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [
+ {
+ "args": [],
+ "name": "series_sum"
+ }
+ ],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "1073741824"
+ ],
+ "bgColor": "#EA5E74",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": ">"
+ },
+ {
+ "value": [
+ "1073741824"
+ ],
+ "bgColor": "#63DBAD",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "<"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false,
+ "fixedGroupByTime": null
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "上次持久化key数量",
+ "pos": {
+ "h": 10,
+ "w": 4,
+ "x": 8,
+ "y": 17
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "series_sum(\"M::`redis_info`:(last(`rdb_changes_since_last_save`)) { `host` = '#{host}' } BY `server`\")",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "rdb_changes_since_last_save",
+ "filters": [
+ {
+ "id": "719d8d10-849c-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [
+ {
+ "args": [],
+ "name": "series_sum"
+ }
+ ],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "last(mem_fragmentation_ratio)",
+ "name": "last(mem_fragmentation_ratio)",
+ "alias": "碎片率"
+ },
+ {
+ "key": "last(maxmemory)",
+ "name": "last(maxmemory)",
+ "alias": "最大内存"
+ },
+ {
+ "key": "last(uptime_in_seconds)",
+ "name": "last(uptime_in_seconds)",
+ "alias": "启动时间"
+ }
+ ],
+ "units": [
+ {
+ "key": "avg(maxmemory)",
+ "name": "avg(maxmemory)",
+ "unit": "",
+ "units": [
+ "digital",
+ "b"
+ ]
+ }
+ ],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "pageSize": 0,
+ "unitType": "custom",
+ "fixedTime": "",
+ "precision": "2",
+ "queryMode": "toGroupColumn",
+ "showTitle": true,
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "showColumns": [],
+ "valMappings": [],
+ "aliasVersion": 2,
+ "columnsWidth": [
+ {
+ "field": "server",
+ "width": 210
+ },
+ {
+ "field": "maxmemory_policy",
+ "width": 126
+ },
+ {
+ "field": "redis_mode",
+ "width": 126
+ },
+ {
+ "field": "redis_version",
+ "width": 126
+ },
+ {
+ "field": "role",
+ "width": 126
+ },
+ {
+ "field": "avg(mem_fragmentation_ratio)",
+ "width": 126
+ },
+ {
+ "field": "avg(mem_fragmentation_ratio)",
+ "width": 123.5
+ }
+ ],
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "table",
+ "showFieldMapping": false,
+ "valColorMappings": [],
+ "openThousandsSeparator": false,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": true,
+ "fixedGroupByTime": null
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "redis基础信息",
+ "pos": {
+ "h": 12,
+ "w": 24,
+ "x": 0,
+ "y": 27
+ },
+ "type": "table",
+ "queries": [
+ {
+ "name": "",
+ "type": "table",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(last(`maxmemory`),last(`mem_fragmentation_ratio`),last(`uptime_in_seconds`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `maxmemory_policy`, `redis_mode`, `redis_version`, `role`",
+ "code": "A",
+ "fill": null,
+ "type": "dql",
+ "alias": "",
+ "field": "maxmemory",
+ "index": "",
+ "fillNum": null,
+ "filters": [
+ {
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "op": "=",
+ "name": "server",
+ "type": "",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "maxmemory_policy",
+ "redis_mode",
+ "redis_version",
+ "role"
+ ],
+ "indexes": [],
+ "labelOp": "",
+ "funcList": [],
+ "interval": "",
+ "fieldFunc": "last",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "dataSourceFunc": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "1"
+ ],
+ "bgColor": "#63DBAD",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "="
+ },
+ {
+ "value": [
+ "1"
+ ],
+ "bgColor": "#F97575",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "<"
+ },
+ {
+ "value": [
+ "N/A"
+ ],
+ "bgColor": "",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "nodata"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [
+ {
+ "operation": "=",
+ "mappingVal": "ok",
+ "originalVal": [
+ "1"
+ ]
+ },
+ {
+ "operation": "<",
+ "mappingVal": "error",
+ "originalVal": [
+ "1"
+ ]
+ },
+ {
+ "operation": "nodata",
+ "mappingVal": "only cluster",
+ "originalVal": [
+ "N/A"
+ ]
+ }
+ ],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "集群状态",
+ "pos": {
+ "h": 11,
+ "w": 4,
+ "x": 0,
+ "y": 0
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(avg(`cluster_state`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_state",
+ "filters": [
+ {
+ "id": "60acc070-84a1-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "d3151f80-84a2-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "irate(avg(total_commands_processed))",
+ "name": "irate(avg(total_commands_processed))",
+ "alias": "{{server}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "QPS",
+ "pos": {
+ "h": 14,
+ "w": 12,
+ "x": 0,
+ "y": 0
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "irate(\"M::`redis_info`:(avg(`total_commands_processed`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`\")",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "total_commands_processed",
+ "fillNum": null,
+ "filters": [
+ {
+ "id": "7c78bde0-84a6-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "7c78bde1-84a6-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "labelOp": "",
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [
+ {
+ "args": [],
+ "name": "irate"
+ }
+ ],
+ "withLabels": [],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "irate(avg(usec))",
+ "name": "irate(avg(usec))",
+ "alias": "{{server}}:{{method}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [
+ "time",
+ "μs"
+ ],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "max",
+ "last",
+ "avg"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "命令执行时间",
+ "pos": {
+ "h": 14,
+ "w": 12,
+ "x": 12,
+ "y": 14
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "irate(\"M::`redis_command_stat`:(avg(`usec`)) { `host` = '#{host}' and `server` = '#{server}' } BY `method`, `server`\")",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "usec",
+ "filters": [
+ {
+ "id": "c62bd8c0-84a4-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "c95182c0-84a4-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "method",
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_command_stat",
+ "queryFuncs": [
+ {
+ "args": [],
+ "name": "irate"
+ }
+ ],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "irate(avg(calls))",
+ "name": "irate(avg(calls))",
+ "alias": "{{server}}:{{method}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "命令执行次数",
+ "pos": {
+ "h": 14,
+ "w": 12,
+ "x": 0,
+ "y": 14
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "irate(\"M::`redis_command_stat`:(avg(`calls`)) { `host` = '#{host}' and `server` = '#{server}' } BY `method`, `server`\")",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "calls",
+ "filters": [
+ {
+ "id": "e710c180-84a5-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "eb1755a0-84a5-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "method",
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_command_stat",
+ "queryFuncs": [
+ {
+ "args": [],
+ "name": "irate"
+ }
+ ],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "avg(connected_clients)",
+ "name": "avg(connected_clients)",
+ "alias": "{{server}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "连接数",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 0,
+ "y": 45
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(avg(`connected_clients`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "connected_clients",
+ "filters": [
+ {
+ "id": "c7a52e20-84ab-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "d1267fd0-84ab-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "avg(rejected_connections)",
+ "name": "avg(rejected_connections)",
+ "alias": "{{server}}-rejected_connections"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": ""
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "拒绝的连接数",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 12,
+ "y": 28
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(avg(`rejected_connections`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "rejected_connections",
+ "filters": [
+ {
+ "id": "9522cff0-84ad-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "995fb650-84ad-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "count(*)",
+ "name": "count(*)",
+ "alias": "{{server}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "slowlog数量",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 0,
+ "y": 79
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "L('default')::`redis_slowlog`:(count(`*`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "*",
+ "fillNum": null,
+ "filters": [
+ {
+ "id": "84ad7c40-84af-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "84ad7c41-84af-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "labelOp": "",
+ "funcList": [],
+ "fieldFunc": "count",
+ "fieldType": "keyword",
+ "namespace": "logging",
+ "dataSource": "redis_slowlog",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "indexFilter": "default"
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "avg(slowlog_avg)",
+ "name": "avg(slowlog_avg)",
+ "alias": "{{server}}:{{command}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [
+ "time",
+ "μs"
+ ],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "Redis slow log 时间",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 12,
+ "y": 79
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "L('default')::`redis_slowlog`:(avg(`slowlog_avg`)) { `host` = '#{host}' and `server` = '#{server}' } BY `command`, `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "slowlog_avg",
+ "fillNum": null,
+ "filters": [
+ {
+ "id": "7c783d20-84b0-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "7c783d21-84b0-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "command",
+ "server"
+ ],
+ "labelOp": "",
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "double",
+ "namespace": "logging",
+ "dataSource": "redis_slowlog",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "indexFilter": "default"
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "avg(keys)",
+ "name": "avg(keys)",
+ "alias": "{{server}}-{{db_name}}-keys"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "内存"
+ },
+ "name": "Redis keys",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 0,
+ "y": 32
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_db`:(avg(`keys`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `db_name`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "keys",
+ "filters": [
+ {
+ "id": "215ee640-84b1-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "24e749b0-84b1-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "db_name"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_db",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "A / B",
+ "name": "A / B",
+ "alias": "{{server}}-{{db_name}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [
+ "percent",
+ "percent_decimal"
+ ],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "B"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "内存"
+ },
+ "name": "TTL百分比",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 12,
+ "y": 32
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "eval(A/B, A=\"M::`redis_db`:(avg(`expires`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `db_name`\", B=\"M::`redis_db`:(avg(`keys`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `db_name`\")",
+ "code": "B",
+ "type": "expression",
+ "alias": "",
+ "children": [
+ {
+ "q": "M::`redis_db`:(avg(`expires`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `db_name`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "expires",
+ "fillNum": null,
+ "filters": [
+ {
+ "id": "5ea0d090-84b1-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "6571f660-84b1-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "db_name"
+ ],
+ "labelOp": "",
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_db",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": ""
+ },
+ {
+ "q": "M::`redis_db`:(avg(`keys`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `db_name`",
+ "code": "B",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "keys",
+ "filters": [
+ {
+ "id": "72fa9f80-84b1-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "7668eb40-84b1-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "db_name"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_db",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ }
+ ],
+ "funcList": [],
+ "expression": "A/B"
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "total_net_input_bytes",
+ "name": "total_net_input_bytes",
+ "alias": "{{server}}-in"
+ },
+ {
+ "key": "total_net_output_bytes",
+ "name": "total_net_output_bytes",
+ "alias": "{{server}}-out"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [
+ "digital",
+ "b"
+ ],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "网络IN",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 0,
+ "y": 62
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(`total_net_input_bytes`) { `host` = '#{host}' and `server` = '#{server}' }[:::irate] BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "total_net_input_bytes",
+ "rollup": "irate",
+ "fillNum": null,
+ "filters": [
+ {
+ "id": "bb18e230-84b2-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "bb18e231-84b2-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "labelOp": "",
+ "funcList": [],
+ "fieldFunc": "",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "evicted_keys",
+ "name": "evicted_keys",
+ "alias": "{{server}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "内存"
+ },
+ "name": "evicted_keys",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 12,
+ "y": 49
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(`evicted_keys`) { `host` = '#{host}' and `server` = '#{server}' }[:::irate] BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "evicted_keys",
+ "rollup": "irate",
+ "filters": [
+ {
+ "id": "f26ecf30-84b5-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "f5303920-84b5-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "total_net_output_bytes",
+ "name": "total_net_output_bytes",
+ "alias": "{{server}}-out"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "性能"
+ },
+ "name": "网络out",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 12,
+ "y": 62
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(`total_net_output_bytes`) { `host` = '#{host}' and `server` = '#{server}' }[:::irate] BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "dql",
+ "alias": "",
+ "field": "total_net_output_bytes",
+ "index": "",
+ "rollup": "irate",
+ "fillNum": null,
+ "filters": [
+ {
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "op": "=",
+ "name": "server",
+ "type": "",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "indexes": [],
+ "labelOp": "",
+ "funcList": [],
+ "interval": "",
+ "fieldFunc": "",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "dataSourceFunc": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "difference(last(expired_keys))",
+ "name": "difference(last(expired_keys))",
+ "alias": "{{server}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "max",
+ "avg",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "内存"
+ },
+ "name": "expired_keys",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 0,
+ "y": 49
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "difference(\"M::`redis_info`:(last(`expired_keys`)) { `server` = '#{server}' and `host` = '#{host}' } BY `server`\")",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "expired_keys",
+ "rollup": "",
+ "filters": [
+ {
+ "id": "64aff730-84b7-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ },
+ {
+ "id": "680dc830-84b7-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [
+ {
+ "args": [],
+ "name": "difference"
+ }
+ ],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "connectNulls": true,
+ "legendValues": "",
+ "timeInterval": "auto",
+ "legendPostion": "none",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "内存"
+ },
+ "name": "Redis实际内存使用(RSS)",
+ "pos": {
+ "h": 15,
+ "w": 12,
+ "x": 12,
+ "y": 0
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(avg(`used_memory_rss`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "used_memory_rss",
+ "filters": [
+ {
+ "id": "1c8d5cd0-84b8-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "200ebb60-84b8-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "A / B",
+ "name": "A / B",
+ "alias": "{{server}}-used_memory"
+ },
+ {
+ "key": "rss",
+ "name": "rss",
+ "alias": "{{server}}-used_memory_rss"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [
+ "percent",
+ "percent_decimal"
+ ],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "max",
+ "avg",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "B"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "内存"
+ },
+ "name": "内存使用占比",
+ "pos": {
+ "h": 17,
+ "w": 12,
+ "x": 0,
+ "y": 15
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "eval(A/B, A=\"M::`redis_info`:(avg(`used_memory`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`\", B=\"M::`redis_info`:(avg(`maxmemory`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`\")",
+ "code": "B",
+ "type": "expression",
+ "alias": "",
+ "children": [
+ {
+ "q": "M::`redis_info`:(avg(`used_memory`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "used_memory",
+ "filters": [
+ {
+ "id": "eafb2070-84b8-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "ee0d1b60-84b8-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ {
+ "q": "M::`redis_info`:(avg(`maxmemory`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "B",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "maxmemory",
+ "filters": [
+ {
+ "id": "faf05cc0-84b8-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "ff9ec9a0-84b8-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ }
+ ],
+ "funcList": [],
+ "expression": "A/B"
+ },
+ "datasource": "dataflux"
+ },
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "eval(A/B, alias='rss', A=\"M::`redis_info`:(avg(`used_memory_rss`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`\", B=\"M::`redis_info`:(avg(`maxmemory`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`\")",
+ "code": "A",
+ "type": "expression",
+ "alias": "rss",
+ "children": [
+ {
+ "q": "M::`redis_info`:(avg(`used_memory_rss`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "used_memory_rss",
+ "filters": [
+ {
+ "id": "eafb2070-84b8-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "ee0d1b60-84b8-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ {
+ "q": "M::`redis_info`:(avg(`maxmemory`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "B",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "maxmemory",
+ "filters": [
+ {
+ "id": "faf05cc0-84b8-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "ff9ec9a0-84b8-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ }
+ ],
+ "funcList": [],
+ "expression": "A/B"
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [
+ {
+ "key": "执行时间",
+ "name": "执行时间",
+ "unit": "",
+ "units": [
+ "time",
+ "μs"
+ ]
+ }
+ ],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "pageSize": 0,
+ "unitType": "custom",
+ "fixedTime": "",
+ "precision": "2",
+ "queryMode": "toGroupColumn",
+ "showTitle": true,
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "showColumns": [],
+ "valMappings": [],
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "table",
+ "showFieldMapping": false,
+ "valColorMappings": [],
+ "mainMeasurementSort": "top",
+ "mainMeasurementLimit": 20,
+ "openThousandsSeparator": false,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "日志"
+ },
+ "name": "SlowLog",
+ "pos": {
+ "h": 18,
+ "w": 12,
+ "x": 0,
+ "y": 0
+ },
+ "type": "table",
+ "queries": [
+ {
+ "name": "",
+ "type": "table",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "L('default')::`redis_slowlog`:(`command` AS `执行命令`) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `host`",
+ "code": "A",
+ "fill": "",
+ "type": "simple",
+ "alias": "执行命令",
+ "field": "command",
+ "search": "",
+ "filters": [
+ {
+ "id": "a0bb9cb0-84bd-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "a8264360-84bd-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "funcList": [],
+ "fieldType": "keyword",
+ "namespace": "logging",
+ "dataSource": "redis_slowlog",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "default",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ },
+ {
+ "name": "",
+ "type": "table",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "L('default')::`redis_slowlog`:(`slowlog_micros` AS `执行时间`) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `host`",
+ "code": "B",
+ "fill": "",
+ "type": "simple",
+ "alias": "执行时间",
+ "field": "slowlog_micros",
+ "search": "",
+ "filters": [
+ {
+ "id": "a0bb9cb0-84bd-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "a8264360-84bd-11ef-9002-1bdef09fbca2",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "funcList": [],
+ "fieldType": "long",
+ "namespace": "logging",
+ "dataSource": "redis_slowlog",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "default",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "index": "default",
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "unitType": "global",
+ "fixedTime": "",
+ "inColumns": [
+ {
+ "field": "time",
+ "headerName": "时间"
+ }
+ ],
+ "showTitle": true,
+ "titleDesc": "",
+ "addColumns": [
+ {
+ "field": "message",
+ "headerName": "内容"
+ },
+ {
+ "hide": true,
+ "field": "status"
+ },
+ {
+ "hide": true,
+ "field": "__docid"
+ }
+ ],
+ "globalUnit": [],
+ "isSampling": true,
+ "valMappings": [],
+ "timeInterval": "",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "log",
+ "showFieldMapping": false,
+ "valColorMappings": []
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "日志"
+ },
+ "name": "redis 运行日志",
+ "pos": {
+ "h": 18,
+ "w": 12,
+ "x": 12,
+ "y": 18
+ },
+ "type": "log",
+ "queries": [
+ {
+ "name": "",
+ "type": "log",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "L('default')::`redis`:(`message`, `status`, `__docid`) { `host` = '#{host}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "内容",
+ "field": null,
+ "fields": [
+ {
+ "alias": "内容",
+ "field": "message"
+ },
+ {
+ "hide": true,
+ "field": "status"
+ },
+ {
+ "hide": true,
+ "field": "__docid"
+ }
+ ],
+ "filters": [
+ {
+ "id": "be448500-84c5-11ef-97d1-cd0be2a4d451",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "count",
+ "fieldType": "keyword",
+ "highlight": true,
+ "namespace": "logging",
+ "dataSource": "redis",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "default",
+ "additionalFields": null,
+ "disableMultipleField": false
+ },
+ "datasource": "dataflux",
+ "noTimeRange": false
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "promql_1",
+ "name": "promql_1",
+ "alias": "主从断开时间{{server}}"
+ }
+ ],
+ "units": [
+ {
+ "key": "promql_1",
+ "name": "promql_1",
+ "unit": "",
+ "units": [
+ "time",
+ "s"
+ ]
+ }
+ ],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "custom",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "last",
+ "max"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "B"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "主从"
+ },
+ "name": "主从断开时间",
+ "pos": {
+ "h": 10,
+ "w": 8,
+ "x": 8,
+ "y": 0
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "promql",
+ "query": {
+ "q": "max(redis_replica:master_link_down_since_seconds{host = '#{host}',server='#{server}'}) by (server) default 0",
+ "code": "B",
+ "type": "promql",
+ "funcList": [],
+ "promqlCode": 1
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "0"
+ ],
+ "bgColor": "#F02D76",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "="
+ },
+ {
+ "value": [
+ "1"
+ ],
+ "bgColor": "#57CECF",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "="
+ },
+ {
+ "value": [
+ "N/A"
+ ],
+ "bgColor": "",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "nodata"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [
+ {
+ "operation": "=",
+ "mappingVal": "down",
+ "originalVal": [
+ "0"
+ ]
+ },
+ {
+ "operation": "=",
+ "mappingVal": "ok",
+ "originalVal": [
+ "1"
+ ]
+ },
+ {
+ "operation": "nodata",
+ "mappingVal": "Only Slave",
+ "originalVal": [
+ "N/A"
+ ]
+ }
+ ],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false,
+ "fixedGroupByTime": null
+ },
+ "group": {
+ "name": "主从"
+ },
+ "name": "主从状态",
+ "pos": {
+ "h": 10,
+ "w": 8,
+ "x": 0,
+ "y": 0
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_replica`:(last(`master_link_status`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "master_link_status",
+ "filters": [
+ {
+ "id": "a10a39a0-8ec8-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "a4231260-8ec8-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_replica",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "avg(master_repl_offset)",
+ "name": "avg(master_repl_offset)",
+ "alias": "主节点发送数据量{{server}}"
+ },
+ {
+ "key": "avg(slave_offset)",
+ "name": "avg(slave_offset)",
+ "alias": "从节点同步数据量{{server}}"
+ }
+ ],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [
+ "digital",
+ "b"
+ ],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "avg",
+ "max",
+ "last"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "主从"
+ },
+ "name": "主从同步数据量",
+ "pos": {
+ "h": 14,
+ "w": 24,
+ "x": 0,
+ "y": 10
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_replica`:(avg(`master_repl_offset`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `host`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "master_repl_offset",
+ "filters": [
+ {
+ "id": "d3512a90-8ec8-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "6d137900-8ecc-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_replica",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ },
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_replica`:(avg(`slave_offset`)) { `server` = '#{server}' and `host` = '#{host}' } BY `server`, `host`",
+ "code": "B",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "slave_offset",
+ "filters": [
+ {
+ "id": "d5d627c0-8ec8-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ },
+ {
+ "id": "74a22270-8ecc-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_replica",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [
+ {
+ "key": "avg(slave_lag)",
+ "name": "avg(slave_lag)",
+ "alias": "{{server}}"
+ }
+ ],
+ "units": [
+ {
+ "key": "avg(slave_lag)",
+ "name": "avg(slave_lag)",
+ "unit": "",
+ "units": [
+ "time",
+ "ms"
+ ]
+ }
+ ],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "custom",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "aliasVersion": 2,
+ "connectNulls": true,
+ "legendValues": [
+ "last",
+ "max",
+ "avg"
+ ],
+ "timeInterval": "auto",
+ "legendPostion": "bottom",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "主从"
+ },
+ "name": "主从同步延迟时间",
+ "pos": {
+ "h": 10,
+ "w": 8,
+ "x": 16,
+ "y": 0
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_replica`:(avg(`slave_lag`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `host`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "slave_lag",
+ "filters": [
+ {
+ "id": "ca2991a0-8ec8-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "cc4e9480-8ec8-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_replica",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": ""
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "集群节点数量",
+ "pos": {
+ "h": 11,
+ "w": 4,
+ "x": 12,
+ "y": 0
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(last(`cluster_known_nodes`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_known_nodes",
+ "filters": [
+ {
+ "id": "7df34f80-8ee4-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "8156ece0-8ee4-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": ""
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "current_epoch",
+ "pos": {
+ "h": 11,
+ "w": 4,
+ "x": 20,
+ "y": 0
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(last(`cluster_current_epoch`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_current_epoch",
+ "filters": [
+ {
+ "id": "eadf1c40-8ee5-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "ececc690-8ee5-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "my_epoch",
+ "pos": {
+ "h": 11,
+ "w": 4,
+ "x": 0,
+ "y": 11
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(last(`cluster_my_epoch`)) { `host` = '#{host}' and `server` = '#{host}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_my_epoch",
+ "filters": [
+ {
+ "id": "07022ca0-8ee6-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "09ddd550-8ee6-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": ""
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "主节点数量",
+ "pos": {
+ "h": 11,
+ "w": 4,
+ "x": 16,
+ "y": 0
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(last(`cluster_size`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_size",
+ "filters": [
+ {
+ "id": "53cde740-8ee6-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "5627dcd0-8ee6-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": true,
+ "fixedGroupByTime": null
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "cluster_slots_assigned",
+ "pos": {
+ "h": 11,
+ "w": 4,
+ "x": 4,
+ "y": 0
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(last(`cluster_slots_assigned`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_slots_assigned",
+ "filters": [
+ {
+ "id": "7db941d0-8ee6-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "80f496b0-8ee6-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "0"
+ ],
+ "bgColor": "#63DBAD",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "="
+ },
+ {
+ "value": [
+ "0"
+ ],
+ "bgColor": "#BA3D7D",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": ">"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false,
+ "fixedGroupByTime": null
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "slots_fail_number",
+ "pos": {
+ "h": 11,
+ "w": 4,
+ "x": 8,
+ "y": 0
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(avg(`cluster_slots_fail`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `host`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_slots_fail",
+ "filters": [
+ {
+ "id": "3a261670-8eee-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "3e988bc0-8eee-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": ""
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "slots_ok_number",
+ "pos": {
+ "h": 11,
+ "w": 4,
+ "x": 4,
+ "y": 11
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(last(`cluster_slots_ok`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "A",
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_slots_ok",
+ "filters": [
+ {
+ "id": "abed9710-8eee-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "af412ee0-8eee-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "groupByTime": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "0"
+ ],
+ "bgColor": "#63DBAD",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "="
+ },
+ {
+ "value": [
+ "0"
+ ],
+ "bgColor": "#BA3D7D",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": ">"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "cluster_slots_pfail",
+ "pos": {
+ "h": 11,
+ "w": 4,
+ "x": 8,
+ "y": 11
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(last(`cluster_slots_pfail`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_slots_pfail",
+ "filters": [
+ {
+ "id": "58697950-8eef-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "5aeec4a0-8eef-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "connectNulls": true,
+ "legendValues": "",
+ "timeInterval": "auto",
+ "legendPostion": "none",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": ""
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "message_ping",
+ "pos": {
+ "h": 11,
+ "w": 12,
+ "x": 12,
+ "y": 11
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(avg(`cluster_stats_messages_ping_received`) AS `ping_received`) { `server` = '#{server}' and `host` = '#{host}' } BY `server`, `host`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "ping_received",
+ "field": "cluster_stats_messages_ping_received",
+ "filters": [
+ {
+ "id": "37479cb0-8ef0-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ },
+ {
+ "id": "3af71020-8ef0-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ },
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(avg(`cluster_stats_messages_ping_sent`) AS `ping_sent`) { `server` = '#{server}' and `host` = '#{host}' } BY `server`, `host`",
+ "code": "B",
+ "fill": null,
+ "type": "simple",
+ "alias": "ping_sent",
+ "field": "cluster_stats_messages_ping_sent",
+ "filters": [
+ {
+ "id": "40009550-8ef0-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ },
+ {
+ "id": "42e89a10-8ef0-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "connectNulls": true,
+ "legendValues": "",
+ "timeInterval": "auto",
+ "legendPostion": "none",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "message_pong",
+ "pos": {
+ "h": 12,
+ "w": 12,
+ "x": 12,
+ "y": 22
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(avg(`cluster_stats_messages_pong_received`) AS `received`) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `host`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "received",
+ "field": "cluster_stats_messages_pong_received",
+ "fillNum": null,
+ "filters": [
+ {
+ "id": "84cc4710-8ef0-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "84cc4711-8ef0-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "labelOp": "",
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ },
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(avg(`cluster_stats_messages_pong_sent`) AS `sent`) { `host` = '#{host}' and `server` = '#{server}' } BY `server`, `host`",
+ "code": "B",
+ "fill": null,
+ "type": "simple",
+ "alias": "sent",
+ "field": "cluster_stats_messages_pong_sent",
+ "fillNum": null,
+ "filters": [
+ {
+ "id": "8146a2c0-8ef0-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "8146a2c1-8ef0-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "labelOp": "",
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": ""
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [],
+ "slimit": 20,
+ "showLine": false,
+ "unitType": "global",
+ "chartType": "line",
+ "fixedTime": "",
+ "isPercent": false,
+ "openStack": false,
+ "precision": "2",
+ "showLabel": false,
+ "showTitle": true,
+ "stackType": "time",
+ "titleDesc": "",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": [],
+ "openCompare": false,
+ "yAxixMaxVal": null,
+ "yAxixMinVal": null,
+ "connectNulls": true,
+ "legendValues": "",
+ "timeInterval": "auto",
+ "legendPostion": "none",
+ "maxPointCount": null,
+ "sorderByOrder": "desc",
+ "xAxisShowType": "time",
+ "isTimeInterval": true,
+ "changeWorkspace": false,
+ "currentChartType": "sequence",
+ "showFieldMapping": false,
+ "onlyShowGroupName": false,
+ "openThousandsSeparator": true,
+ "mainMeasurementQueryCode": "A"
+ },
+ "fixedTime": ""
+ },
+ "group": {
+ "name": "集群"
+ },
+ "name": "messages_total",
+ "pos": {
+ "h": 12,
+ "w": 12,
+ "x": 0,
+ "y": 22
+ },
+ "type": "sequence",
+ "queries": [
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(avg(`cluster_stats_messages_sent`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_stats_messages_sent",
+ "filters": [
+ {
+ "id": "3e4ef840-8ef1-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "40dd6b50-8ef1-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ },
+ {
+ "name": "",
+ "type": "sequence",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(avg(`cluster_stats_messages_received`)) { `host` = '#{host}' and `server` = '#{server}' } BY `server`",
+ "code": "B",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_stats_messages_received",
+ "filters": [
+ {
+ "id": "3e4ef840-8ef1-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "40dd6b50-8ef1-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "0"
+ ],
+ "bgColor": "#F02D76",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "="
+ },
+ {
+ "value": [
+ "1"
+ ],
+ "bgColor": "#63DBAD",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "="
+ },
+ {
+ "value": [
+ "N/A"
+ ],
+ "bgColor": "",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "nodata"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [
+ {
+ "operation": "=",
+ "mappingVal": "down",
+ "originalVal": [
+ "0"
+ ]
+ },
+ {
+ "operation": "=",
+ "mappingVal": "ok",
+ "originalVal": [
+ "1"
+ ]
+ },
+ {
+ "operation": "nodata",
+ "mappingVal": "Only Slave",
+ "originalVal": [
+ "N/A"
+ ]
+ }
+ ],
+ "showLine": false,
+ "unitType": "custom",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false,
+ "fixedGroupByTime": null
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "主从状态",
+ "pos": {
+ "h": 10,
+ "w": 4,
+ "x": 0,
+ "y": 17
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_replica`:(last(`master_link_status`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "master_link_status",
+ "filters": [
+ {
+ "id": "a10a39a0-8ec8-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "a4231260-8ec8-11ef-ba61-1d955ceb5ef8",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_replica",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ]
+ },
+ {
+ "extend": {
+ "settings": {
+ "alias": [],
+ "units": [],
+ "colors": [],
+ "levels": [
+ {
+ "value": [
+ "1"
+ ],
+ "bgColor": "#63DBAD",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "="
+ },
+ {
+ "value": [
+ "1"
+ ],
+ "bgColor": "#F97575",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "<"
+ },
+ {
+ "value": [
+ "N/A"
+ ],
+ "bgColor": "",
+ "fontColor": "",
+ "lineColor": "",
+ "operation": "nodata"
+ }
+ ],
+ "bgColor": "",
+ "mappings": [
+ {
+ "operation": "=",
+ "mappingVal": "ok",
+ "originalVal": [
+ "1"
+ ]
+ },
+ {
+ "operation": "<",
+ "mappingVal": "error",
+ "originalVal": [
+ "1"
+ ]
+ },
+ {
+ "operation": "nodata",
+ "mappingVal": "only cluster",
+ "originalVal": [
+ "N/A"
+ ]
+ }
+ ],
+ "showLine": false,
+ "unitType": "global",
+ "fixedTime": "",
+ "fontColor": "",
+ "lineColor": "#3AB8FF",
+ "precision": "2",
+ "showTitle": true,
+ "titleDesc": "",
+ "downsample": "last",
+ "globalUnit": [],
+ "isSampling": true,
+ "compareType": "",
+ "openCompare": false,
+ "showLineAxis": false,
+ "timeInterval": "auto",
+ "isTimeInterval": false,
+ "changeWorkspace": false,
+ "currentChartType": "singlestat",
+ "showFieldMapping": false,
+ "sequenceChartType": "line",
+ "openThousandsSeparator": true
+ },
+ "fixedTime": "",
+ "isRefresh": false
+ },
+ "group": {
+ "name": "总览"
+ },
+ "name": "集群状态",
+ "pos": {
+ "h": 10,
+ "w": 4,
+ "x": 12,
+ "y": 17
+ },
+ "type": "singlestat",
+ "queries": [
+ {
+ "name": "",
+ "type": "singlestat",
+ "unit": "",
+ "color": "",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(avg(`cluster_state`)) { `host` = '#{host}' and `server` = '#{server}' }",
+ "code": "A",
+ "fill": null,
+ "type": "simple",
+ "alias": "",
+ "field": "cluster_state",
+ "filters": [
+ {
+ "id": "60acc070-84a1-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "host",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{host}",
+ "values": []
+ },
+ {
+ "id": "d3151f80-84a2-11ef-a396-4f0ff93049d1",
+ "op": "=",
+ "name": "server",
+ "type": "keyword",
+ "logic": "and",
+ "value": "#{server}",
+ "values": []
+ }
+ ],
+ "groupBy": [],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "groupByTime": "",
+ "indexFilter": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux",
+ "dashboardUUID": "dsbd_e5bc13ae42f34a19befb51c968236ae7"
+ }
+ ]
+ }
+ ],
+ "groups": [
+ {
+ "name": "总览",
+ "extend": {
+ "bgColor": ""
+ }
+ },
+ {
+ "name": "性能",
+ "extend": {}
+ },
+ {
+ "name": "内存",
+ "extend": {
+ "bgColor": ""
+ }
+ },
+ {
+ "name": "主从",
+ "extend": {}
+ },
+ {
+ "name": "集群",
+ "extend": {}
+ },
+ {
+ "name": "持久化",
+ "extend": {}
+ },
+ {
+ "name": "日志",
+ "extend": {
+ "bgColor": ""
+ }
+ }
+ ],
+ "type": "template"
+ }
+}
\ No newline at end of file
diff --git a/internal/export/monitor/redis/redis__zh.json b/internal/export/monitor/redis/redis__zh.json
new file mode 100644
index 0000000000..6a2ef1ae20
--- /dev/null
+++ b/internal/export/monitor/redis/redis__zh.json
@@ -0,0 +1,912 @@
+{
+ "checkers": [
+ {
+ "jsonScript": {
+ "type": "simpleCheck",
+ "every": "5m",
+ "title": "{{host}} 节点 Redis 内存使用过高 {{Result}}%",
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "message": "Redis Server 为 {{server}}, Host 为{{host}} 节点 Redis 内存使用过高,检测结果: {{Result}}%",
+ "targets": [
+ {
+ "dql": "eval(A/B*100, A=\"M::`redis_info`:(avg(`used_memory`)) BY `server`, `host`\", B=\"M::`redis_info`:(avg(`maxmemory`)) BY `server`, `host`\")",
+ "alias": "Result",
+ "qtype": "dql"
+ }
+ ],
+ "channels": [],
+ "interval": 300,
+ "atAccounts": [],
+ "checkerOpt": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "90"
+ ],
+ "operator": ">="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ },
+ {
+ "status": "error",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "80"
+ ],
+ "operator": ">="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ },
+ {
+ "status": "warning",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "70"
+ ],
+ "operator": ">="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "infoEvent": false,
+ "combineExpr": "A && B",
+ "openMatchTimes": false
+ },
+ "noDataTitle": "",
+ "noDataMessage": "",
+ "atNoDataAccounts": [],
+ "disableCheckEndTime": false,
+ "recoverNeedPeriodCount": 2
+ },
+ "extend": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "90"
+ ],
+ "operator": ">="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ },
+ {
+ "status": "error",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "80"
+ ],
+ "operator": ">="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ },
+ {
+ "status": "warning",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "70"
+ ],
+ "operator": ">="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "manager": [],
+ "funcName": "",
+ "querylist": [
+ {
+ "uuid": "47d75378-8616-4a0f-86e3-0f3f6e31fc1e",
+ "qtype": "dql",
+ "query": {
+ "q": "eval(A/B*100, A=\"M::`redis_info`:(avg(`used_memory`)) BY `server`, `host`\", B=\"M::`redis_info`:(avg(`maxmemory`)) BY `server`, `host`\")",
+ "code": "Result",
+ "type": "expression",
+ "alias": "",
+ "children": [
+ {
+ "q": "M::`redis_info`:(avg(`used_memory`)) BY `server`, `host`",
+ "code": "A",
+ "fill": null,
+ "type": "dql",
+ "alias": "",
+ "field": "used_memory",
+ "index": "",
+ "fillNum": null,
+ "filters": [],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "indexes": [],
+ "labelOp": "",
+ "interval": "",
+ "fieldFunc": "avg",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "dataSourceFunc": ""
+ },
+ {
+ "q": "M::`redis_info`:(avg(`maxmemory`)) BY `server`, `host`",
+ "code": "B",
+ "fill": null,
+ "type": "dql",
+ "alias": "",
+ "field": "maxmemory",
+ "index": "",
+ "fillNum": null,
+ "filters": [],
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "indexes": [],
+ "labelOp": "",
+ "interval": "",
+ "fieldFunc": "avg",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "dataSourceFunc": ""
+ }
+ ],
+ "funcList": [],
+ "expression": "A/B*100"
+ },
+ "datasource": "dataflux"
+ }
+ ],
+ "issueLevelUUID": "",
+ "needRecoverIssue": false,
+ "isNeedCreateIssue": false
+ },
+ "is_disable": false,
+ "tagInfo": [],
+ "secret": "",
+ "type": "trigger",
+ "monitorName": "default",
+ "alertPolicyNames": []
+ },
+ {
+ "jsonScript": {
+ "type": "seniorMutationsCheck",
+ "every": "1m",
+ "range": 300,
+ "title": "{{host}} 节点 Redis 连接数发生突增 ,突增值为 {{Result}}",
+ "groupBy": [
+ "host",
+ "server"
+ ],
+ "message": "",
+ "range_2": -1,
+ "targets": [
+ {
+ "dql": "M::`redis_info`:(avg(`connected_clients`)) BY `host`, `server`",
+ "alias": "Result",
+ "qtype": "dql"
+ }
+ ],
+ "channels": [],
+ "interval": 300,
+ "atAccounts": [],
+ "checkerOpt": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "100"
+ ],
+ "operator": ">="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "diffMode": "value",
+ "direction": "up",
+ "threshold": {
+ "value": null,
+ "status": false,
+ "operator": ">"
+ },
+ "combineExpr": "A && B"
+ },
+ "noDataTitle": "",
+ "periodBefore": 0,
+ "noDataMessage": "",
+ "atNoDataAccounts": [],
+ "disableCheckEndTime": false,
+ "recoverNeedPeriodCount": 2
+ },
+ "extend": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "100"
+ ],
+ "operator": ">="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "manager": [],
+ "funcName": "",
+ "querylist": [
+ {
+ "uuid": "9b527470-095a-40cd-b546-b20af98d655c",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(avg(`connected_clients`)) BY `host`, `server`",
+ "code": "Result",
+ "fill": null,
+ "type": "dql",
+ "alias": "",
+ "field": "connected_clients",
+ "index": "",
+ "fillNum": null,
+ "filters": [],
+ "groupBy": [
+ "host",
+ "server"
+ ],
+ "indexes": [],
+ "labelOp": "",
+ "funcList": [],
+ "interval": "",
+ "fieldFunc": "avg",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "dataSourceFunc": ""
+ },
+ "datasource": "dataflux"
+ }
+ ],
+ "issueLevelUUID": "",
+ "needRecoverIssue": false,
+ "isNeedCreateIssue": false
+ },
+ "is_disable": false,
+ "tagInfo": [],
+ "secret": "",
+ "type": "trigger",
+ "monitorName": "default",
+ "alertPolicyNames": []
+ },
+ {
+ "jsonScript": {
+ "type": "simpleCheck",
+ "every": "5m",
+ "title": "{{server}} 节点Redis slots 分配失败",
+ "groupBy": [
+ "host",
+ "server"
+ ],
+ "message": "",
+ "targets": [
+ {
+ "dql": "M::`redis_cluster`:(avg(`cluster_slots_fail`)) BY `host`, `server`",
+ "alias": "Result",
+ "qtype": "dql"
+ }
+ ],
+ "channels": [],
+ "interval": 300,
+ "atAccounts": [],
+ "checkerOpt": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "1"
+ ],
+ "operator": ">="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "combineExpr": "A && B"
+ },
+ "noDataTitle": "",
+ "noDataMessage": "",
+ "atNoDataAccounts": [],
+ "disableCheckEndTime": false,
+ "recoverNeedPeriodCount": 2
+ },
+ "extend": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "1"
+ ],
+ "operator": ">="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "manager": [],
+ "funcName": "",
+ "querylist": [
+ {
+ "uuid": "25ba38bf-27f6-4fa7-bbf4-f9cf0134ef59",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(avg(`cluster_slots_fail`)) BY `host`, `server`",
+ "code": "Result",
+ "fill": null,
+ "type": "dql",
+ "alias": "",
+ "field": "cluster_slots_fail",
+ "index": "",
+ "fillNum": null,
+ "filters": [],
+ "groupBy": [
+ "host",
+ "server"
+ ],
+ "indexes": [],
+ "labelOp": "",
+ "funcList": [],
+ "interval": "",
+ "fieldFunc": "avg",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "dataSourceFunc": ""
+ },
+ "datasource": "dataflux"
+ }
+ ],
+ "issueLevelUUID": "",
+ "needRecoverIssue": false,
+ "isNeedCreateIssue": false
+ },
+ "is_disable": false,
+ "tagInfo": [],
+ "secret": "",
+ "type": "trigger",
+ "monitorName": "default",
+ "alertPolicyNames": []
+ },
+ {
+ "jsonScript": {
+ "type": "simpleCheck",
+ "every": "5m",
+ "title": "{{server}} 节点 redis_cluster 状态异常",
+ "groupBy": [
+ "host",
+ "server"
+ ],
+ "message": "",
+ "targets": [
+ {
+ "dql": "M::`redis_cluster`:(avg(`cluster_state`)) BY `host`, `server`",
+ "alias": "Result",
+ "qtype": "dql"
+ }
+ ],
+ "channels": [],
+ "interval": 300,
+ "atAccounts": [],
+ "checkerOpt": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "1"
+ ],
+ "operator": "!="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "combineExpr": "A && B"
+ },
+ "noDataTitle": "",
+ "noDataMessage": "",
+ "atNoDataAccounts": [],
+ "disableCheckEndTime": false,
+ "recoverNeedPeriodCount": 2
+ },
+ "extend": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "1"
+ ],
+ "operator": "!="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "manager": [],
+ "funcName": "",
+ "querylist": [
+ {
+ "uuid": "f3a8299c-a395-42ca-9032-01d761869104",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_cluster`:(avg(`cluster_state`)) BY `host`, `server`",
+ "code": "Result",
+ "fill": null,
+ "type": "dql",
+ "alias": "",
+ "field": "cluster_state",
+ "index": "",
+ "fillNum": null,
+ "filters": [],
+ "groupBy": [
+ "host",
+ "server"
+ ],
+ "indexes": [],
+ "labelOp": "",
+ "funcList": [],
+ "interval": "",
+ "fieldFunc": "avg",
+ "namespace": "metric",
+ "dataSource": "redis_cluster",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "dataSourceFunc": ""
+ },
+ "datasource": "dataflux"
+ }
+ ],
+ "issueLevelUUID": "",
+ "needRecoverIssue": false,
+ "isNeedCreateIssue": false
+ },
+ "is_disable": false,
+ "tagInfo": [],
+ "secret": "",
+ "type": "trigger",
+ "monitorName": "default",
+ "alertPolicyNames": []
+ },
+ {
+ "jsonScript": {
+ "type": "simpleCheck",
+ "every": "5m",
+ "title": "{{host}} 节点redis发生重启,请确认是否正常",
+ "groupBy": [
+ "host",
+ "server"
+ ],
+ "message": "",
+ "targets": [
+ {
+ "dql": "M::`redis_info`:(avg(`uptime_in_seconds`)) BY `host`, `server`",
+ "alias": "Result",
+ "qtype": "dql"
+ }
+ ],
+ "channels": [],
+ "interval": 300,
+ "atAccounts": [],
+ "checkerOpt": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "600"
+ ],
+ "operator": "<="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "combineExpr": "A && B"
+ },
+ "noDataTitle": "{{host}} 节点redis -- uptime_in_seconds 指标断档,请确认redis进程是否存在",
+ "noDataAction": "noDataEvent",
+ "noDataMessage": "",
+ "noDataInterval": 300,
+ "atNoDataAccounts": [],
+ "disableCheckEndTime": false,
+ "recoverNeedPeriodCount": 2
+ },
+ "extend": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "600"
+ ],
+ "operator": "<="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "manager": [],
+ "funcName": "",
+ "querylist": [
+ {
+ "uuid": "cf4b98d0-fd9f-43d6-99b3-303e51e6e531",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_info`:(avg(`uptime_in_seconds`)) BY `host`, `server`",
+ "code": "Result",
+ "fill": null,
+ "type": "dql",
+ "alias": "",
+ "field": "uptime_in_seconds",
+ "index": "",
+ "fillNum": null,
+ "filters": [],
+ "groupBy": [
+ "host",
+ "server"
+ ],
+ "indexes": [],
+ "labelOp": "",
+ "funcList": [],
+ "interval": "",
+ "fieldFunc": "avg",
+ "namespace": "metric",
+ "dataSource": "redis_info",
+ "queryFuncs": [],
+ "withLabels": [],
+ "groupByTime": "",
+ "dataSourceFunc": ""
+ },
+ "datasource": "dataflux"
+ }
+ ],
+ "issueLevelUUID": "",
+ "needRecoverIssue": false,
+ "isNeedCreateIssue": false
+ },
+ "is_disable": false,
+ "tagInfo": [],
+ "secret": "",
+ "type": "trigger",
+ "monitorName": "default",
+ "alertPolicyNames": []
+ },
+ {
+ "jsonScript": {
+ "type": "simpleCheck",
+ "every": "5m",
+ "title": "{{host}} ,{{server}} 主从同步断开,请注意查看节点是否正常",
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "message": "",
+ "targets": [
+ {
+ "dql": "M::`redis_replica`:(last(`master_link_status`)) BY `server`, `host`",
+ "alias": "Result",
+ "qtype": "dql"
+ }
+ ],
+ "channels": [],
+ "interval": 300,
+ "atAccounts": [],
+ "checkerOpt": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "0"
+ ],
+ "operator": "="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "combineExpr": "A && B"
+ },
+ "noDataTitle": "",
+ "noDataMessage": "",
+ "atNoDataAccounts": [],
+ "disableCheckEndTime": false,
+ "notificationMessage": "",
+ "recoverNeedPeriodCount": 2,
+ "openNotificationMessage": false,
+ "noDataNotificationMessage": "",
+ "openNoDataNotificationMessage": false
+ },
+ "extend": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "0"
+ ],
+ "operator": "="
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "manager": [],
+ "funcName": "",
+ "querylist": [
+ {
+ "uuid": "f41a7145-41d1-4a84-a6fc-ec0a8665e669",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_replica`:(last(`master_link_status`)) BY `server`, `host`",
+ "code": "Result",
+ "type": "simple",
+ "alias": "",
+ "field": "master_link_status",
+ "groupBy": [
+ "server",
+ "host"
+ ],
+ "funcList": [],
+ "fieldFunc": "last",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_replica",
+ "groupByTime": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ],
+ "issueLevelUUID": "",
+ "needRecoverIssue": false,
+ "isNeedCreateIssue": false
+ },
+ "is_disable": false,
+ "tagInfo": [],
+ "secret": "",
+ "type": "trigger",
+ "monitorName": "default",
+ "alertPolicyNames": []
+ },
+ {
+ "jsonScript": {
+ "type": "simpleCheck",
+ "every": "5m",
+ "title": "{{host}} , {{server}} 主从同步延迟较高,延迟值为{{Result}} ms",
+ "groupBy": [
+ "host",
+ "server"
+ ],
+ "message": "",
+ "targets": [
+ {
+ "dql": "M::`redis_replica`:(avg(`slave_lag`)) BY `host`, `server`",
+ "alias": "Result",
+ "qtype": "dql"
+ }
+ ],
+ "channels": [],
+ "interval": 300,
+ "atAccounts": [],
+ "checkerOpt": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "1000"
+ ],
+ "operator": ">"
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ },
+ {
+ "status": "error",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "100"
+ ],
+ "operator": ">"
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ },
+ {
+ "status": "warning",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "10"
+ ],
+ "operator": ">"
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "combineExpr": "A && B"
+ },
+ "noDataTitle": "",
+ "noDataMessage": "",
+ "atNoDataAccounts": [],
+ "disableCheckEndTime": false,
+ "notificationMessage": "",
+ "recoverNeedPeriodCount": 2,
+ "openNotificationMessage": false,
+ "noDataNotificationMessage": "",
+ "openNoDataNotificationMessage": false
+ },
+ "extend": {
+ "rules": [
+ {
+ "status": "critical",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "1000"
+ ],
+ "operator": ">"
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ },
+ {
+ "status": "error",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "100"
+ ],
+ "operator": ">"
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ },
+ {
+ "status": "warning",
+ "conditions": [
+ {
+ "alias": "Result",
+ "operands": [
+ "10"
+ ],
+ "operator": ">"
+ }
+ ],
+ "matchTimes": 1,
+ "conditionLogic": "and"
+ }
+ ],
+ "manager": [],
+ "funcName": "",
+ "querylist": [
+ {
+ "uuid": "651ca34d-bb99-4673-a5f2-d30ff1ec6e29",
+ "qtype": "dql",
+ "query": {
+ "q": "M::`redis_replica`:(avg(`slave_lag`)) BY `host`, `server`",
+ "code": "Result",
+ "type": "simple",
+ "alias": "",
+ "field": "slave_lag",
+ "groupBy": [
+ "host",
+ "server"
+ ],
+ "funcList": [],
+ "fieldFunc": "avg",
+ "fieldType": "float",
+ "namespace": "metric",
+ "dataSource": "redis_replica",
+ "groupByTime": "",
+ "additionalFields": null
+ },
+ "datasource": "dataflux"
+ }
+ ],
+ "issueLevelUUID": "",
+ "needRecoverIssue": false,
+ "isNeedCreateIssue": false
+ },
+ "is_disable": false,
+ "tagInfo": [],
+ "secret": "",
+ "type": "trigger",
+ "monitorName": "default",
+ "alertPolicyNames": []
+ }
+ ]
+}
\ No newline at end of file