Browse Source

Update grafana tmpl.

Chuanyi Li 6 years ago
parent
commit
cae6df1457
1 changed files with 180 additions and 109 deletions
  1. 180 109
      deployer/src/main/resources/metrics/Canal_instances_tmpl.json

+ 180 - 109
deployer/src/main/resources/metrics/Canal_instances_tmpl.json

@@ -1,4 +1,34 @@
 {
+  "__inputs": [
+    {
+      "name": "DS_PROMETHEUS",
+      "label": "prometheus",
+      "description": "",
+      "type": "datasource",
+      "pluginId": "prometheus",
+      "pluginName": "Prometheus"
+    }
+  ],
+  "__requires": [
+    {
+      "type": "grafana",
+      "id": "grafana",
+      "name": "Grafana",
+      "version": "5.2.2"
+    },
+    {
+      "type": "panel",
+      "id": "graph",
+      "name": "Graph",
+      "version": "5.0.0"
+    },
+    {
+      "type": "datasource",
+      "id": "prometheus",
+      "name": "Prometheus",
+      "version": "5.0.0"
+    }
+  ],
   "annotations": {
     "list": [
       {
@@ -15,8 +45,8 @@
   "editable": true,
   "gnetId": null,
   "graphTooltip": 0,
-  "id": 8,
-  "iteration": 1534740332233,
+  "id": null,
+  "iteration": 1536989235272,
   "links": [],
   "panels": [
     {
@@ -189,7 +219,7 @@
       "steppedLine": false,
       "targets": [
         {
-          "expr": "rate(canal_instance_received_binlog_bytes{destination=~\"$destination\"}[2m]) / 1024",
+          "expr": "rate(canal_instance_received_binlog_bytes{destination=~\"$destination\", parser=\"0\"}[2m]) / 1024",
           "format": "time_series",
           "interval": "15s",
           "intervalFactor": 2,
@@ -203,6 +233,22 @@
           "intervalFactor": 2,
           "legendFormat": "outbound",
           "refId": "B"
+        },
+        {
+          "expr": "rate(canal_instance_received_binlog_bytes{destination=~\"$destination\", parser=\"1\"}[2m]) / 1024",
+          "format": "time_series",
+          "interval": "15s",
+          "intervalFactor": 2,
+          "legendFormat": "inbound-1",
+          "refId": "C"
+        },
+        {
+          "expr": "rate(canal_instance_received_binlog_bytes{destination=~\"$destination\", parser=\"2\"}[2m]) / 1024",
+          "format": "time_series",
+          "interval": "15s",
+          "intervalFactor": 2,
+          "legendFormat": "inbound-2",
+          "refId": "D"
         }
       ],
       "thresholds": [],
@@ -399,20 +445,36 @@
       "steppedLine": false,
       "targets": [
         {
-          "expr": "clamp_max(rate(canal_instance_sink_blocking_time{destination=~\"$destination\"}[2m]), 1000) / 10",
+          "expr": "clamp_max(rate(canal_instance_publish_blocking_time{destination=~\"$destination\", parser=\"0\"}[2m]), 1000) / 10",
           "format": "time_series",
           "interval": "15s",
           "intervalFactor": 2,
           "legendFormat": "dump",
-          "refId": "A"
+          "refId": "B"
         },
         {
-          "expr": "clamp_max(rate(canal_instance_publish_blocking_time{destination=~\"$destination\"}[2m]), 1000) / 10",
+          "expr": "clamp_max(rate(canal_instance_sink_blocking_time{destination=~\"$destination\"}[2m]), 1000) / 10",
           "format": "time_series",
           "interval": "15s",
           "intervalFactor": 2,
           "legendFormat": "sink",
-          "refId": "B"
+          "refId": "A"
+        },
+        {
+          "expr": "clamp_max(rate(canal_instance_publish_blocking_time{destination=~\"$destination\", parser=\"1\"}[2m]), 1000) / 10",
+          "format": "time_series",
+          "interval": "15s",
+          "intervalFactor": 2,
+          "legendFormat": "dump-1",
+          "refId": "C"
+        },
+        {
+          "expr": "clamp_max(rate(canal_instance_publish_blocking_time{destination=~\"$destination\", parser=\"2\"}[2m]), 1000) / 10",
+          "format": "time_series",
+          "interval": "15s",
+          "intervalFactor": 2,
+          "legendFormat": "dump-2",
+          "refId": "D"
         }
       ],
       "thresholds": [],
@@ -465,7 +527,7 @@
       },
       "id": 32,
       "panels": [],
-      "title": "Server",
+      "title": "Throughput",
       "type": "row"
     },
     {
@@ -660,21 +722,34 @@
         "alignLevel": null
       }
     },
+    {
+      "collapsed": false,
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 12
+      },
+      "id": 34,
+      "panels": [],
+      "title": "Client",
+      "type": "row"
+    },
     {
       "aliasColors": {},
       "bars": false,
       "dashLength": 10,
       "dashes": false,
       "datasource": "$datasource",
-      "description": "Canal instance ringbuffer内未释放的events数量。",
+      "description": "Canal instance接收到的请求统计,结果按packet type分类。",
       "fill": 1,
       "gridPos": {
         "h": 5,
         "w": 6,
-        "x": 12,
-        "y": 7
+        "x": 0,
+        "y": 13
       },
-      "id": 20,
+      "id": 16,
       "legend": {
         "avg": false,
         "current": false,
@@ -698,18 +773,18 @@
       "steppedLine": false,
       "targets": [
         {
-          "expr": "canal_instance_store_produce_seq{destination=~\"$destination\"} - canal_instance_store_consume_seq{destination=~\"$destination\"}",
+          "expr": "canal_instance_client_packets{destination=~\"$destination\"}",
           "format": "time_series",
           "interval": "15s",
           "intervalFactor": 2,
-          "legendFormat": "events",
+          "legendFormat": "{{packetType}}",
           "refId": "A"
         }
       ],
       "thresholds": [],
       "timeFrom": null,
       "timeShift": null,
-      "title": "Store remain events",
+      "title": "Client requests",
       "tooltip": {
         "shared": true,
         "sort": 0,
@@ -725,16 +800,14 @@
       },
       "yaxes": [
         {
-          "decimals": null,
           "format": "none",
-          "label": "",
+          "label": null,
           "logBase": 1,
           "max": null,
           "min": null,
           "show": true
         },
         {
-          "decimals": null,
           "format": "short",
           "label": null,
           "logBase": 1,
@@ -753,16 +826,16 @@
       "bars": false,
       "dashLength": 10,
       "dashes": false,
-      "datasource": "$datasource",
-      "description": "Canal instance ringbuffer 内未释放events占用内存。",
+      "datasource": "${DS_PROMETHEUS}",
+      "description": "client 请求的GET与ACK包的QPS。",
       "fill": 1,
       "gridPos": {
         "h": 5,
         "w": 6,
-        "x": 18,
-        "y": 7
+        "x": 6,
+        "y": 13
       },
-      "id": 22,
+      "id": 38,
       "legend": {
         "avg": false,
         "current": false,
@@ -786,18 +859,26 @@
       "steppedLine": false,
       "targets": [
         {
-          "expr": "(canal_instance_store_produce_mem{destination=~\"$destination\"} - canal_instance_store_consume_mem{destination=~\"$destination\"}) / 1024",
+          "expr": "rate(canal_instance_client_packets{destination=~\"$destination\",packetType=\"GET\"}[2m])",
           "format": "time_series",
           "interval": "15s",
           "intervalFactor": 2,
-          "legendFormat": "memsize",
+          "legendFormat": "GET",
           "refId": "A"
+        },
+        {
+          "expr": "rate(canal_instance_client_packets{destination=~\"$destination\",packetType=\"CLIENTACK\"}[2m])",
+          "format": "time_series",
+          "interval": "15s",
+          "intervalFactor": 2,
+          "legendFormat": "ACK",
+          "refId": "B"
         }
       ],
       "thresholds": [],
       "timeFrom": null,
       "timeShift": null,
-      "title": "Store remain mem",
+      "title": "Client QPS",
       "tooltip": {
         "shared": true,
         "sort": 0,
@@ -813,7 +894,7 @@
       },
       "yaxes": [
         {
-          "format": "deckbytes",
+          "format": "short",
           "label": null,
           "logBase": 1,
           "max": null,
@@ -834,34 +915,21 @@
         "alignLevel": null
       }
     },
-    {
-      "collapsed": false,
-      "gridPos": {
-        "h": 1,
-        "w": 24,
-        "x": 0,
-        "y": 12
-      },
-      "id": 34,
-      "panels": [],
-      "title": "Client",
-      "type": "row"
-    },
     {
       "aliasColors": {},
       "bars": false,
       "dashLength": 10,
       "dashes": false,
       "datasource": "$datasource",
-      "description": "Canal instance接收到的请求统计,结果按packet type分类。",
+      "description": "server响应GET请求,但返回空包的占比。",
       "fill": 1,
       "gridPos": {
         "h": 5,
         "w": 6,
-        "x": 0,
+        "x": 12,
         "y": 13
       },
-      "id": 16,
+      "id": 26,
       "legend": {
         "avg": false,
         "current": false,
@@ -885,18 +953,25 @@
       "steppedLine": false,
       "targets": [
         {
-          "expr": "canal_instance_client_packets{destination=~\"$destination\"}",
+          "expr": "rate(canal_instance_client_empty_batches{destination=~\"$destination\"}[2m])",
           "format": "time_series",
           "interval": "15s",
           "intervalFactor": 2,
-          "legendFormat": "{{packetType}}",
+          "legendFormat": "empty",
           "refId": "A"
+        },
+        {
+          "expr": "rate(canal_instance_client_packets{destination=~\"$destination\", packetType=\"GET\"}[2m])",
+          "format": "time_series",
+          "intervalFactor": 1,
+          "legendFormat": "nonempty",
+          "refId": "B"
         }
       ],
       "thresholds": [],
       "timeFrom": null,
       "timeShift": null,
-      "title": "Client requests",
+      "title": "Empty packets",
       "tooltip": {
         "shared": true,
         "sort": 0,
@@ -912,7 +987,7 @@
       },
       "yaxes": [
         {
-          "format": "none",
+          "format": "wps",
           "label": null,
           "logBase": 1,
           "max": null,
@@ -939,20 +1014,22 @@
       "dashLength": 10,
       "dashes": false,
       "datasource": "$datasource",
-      "description": "client 请求的GET与ACK包的QPS。",
+      "description": "Canal client 请求响应时间的概况。",
       "fill": 1,
       "gridPos": {
         "h": 5,
         "w": 6,
-        "x": 6,
+        "x": 18,
         "y": 13
       },
-      "id": 38,
+      "id": 18,
       "legend": {
+        "alignAsTable": false,
         "avg": false,
         "current": false,
         "max": false,
         "min": false,
+        "rightSide": false,
         "show": true,
         "total": false,
         "values": false
@@ -965,37 +1042,40 @@
       "pointradius": 5,
       "points": false,
       "renderer": "flot",
-      "seriesOverrides": [],
+      "seriesOverrides": [
+        {
+          "alias": "25.0",
+          "yaxis": 1
+        },
+        {
+          "alias": "100.0",
+          "yaxis": 1
+        }
+      ],
       "spaceLength": 10,
       "stack": false,
       "steppedLine": false,
       "targets": [
         {
-          "expr": "rate(canal_instance_client_packets{destination=~\"$destination\",packetType=\"GET\"}[2m])",
+          "expr": "rate(canal_instance_client_request_latency_bucket{destination=~\"$destination\"}[2m])",
           "format": "time_series",
+          "hide": false,
           "interval": "15s",
           "intervalFactor": 2,
-          "legendFormat": "GET",
+          "legendFormat": "{{le}}ms",
           "refId": "A"
-        },
-        {
-          "expr": "rate(canal_instance_client_packets{destination=~\"$destination\",packetType=\"CLIENTACK\"}[2m])",
-          "format": "time_series",
-          "interval": "15s",
-          "intervalFactor": 2,
-          "legendFormat": "ACK",
-          "refId": "B"
         }
       ],
       "thresholds": [],
       "timeFrom": null,
       "timeShift": null,
-      "title": "Client QPS",
+      "title": "Response time",
       "tooltip": {
         "shared": true,
         "sort": 0,
         "value_type": "individual"
       },
+      "transparent": false,
       "type": "graph",
       "xaxis": {
         "buckets": null,
@@ -1027,21 +1107,34 @@
         "alignLevel": null
       }
     },
+    {
+      "collapsed": false,
+      "gridPos": {
+        "h": 1,
+        "w": 24,
+        "x": 0,
+        "y": 18
+      },
+      "id": 36,
+      "panels": [],
+      "title": "Store",
+      "type": "row"
+    },
     {
       "aliasColors": {},
       "bars": false,
       "dashLength": 10,
       "dashes": false,
       "datasource": "$datasource",
-      "description": "server响应GET请求,但返回空包的占比。",
+      "description": "Canal instance ringbuffer内未释放的events数量。",
       "fill": 1,
       "gridPos": {
         "h": 5,
         "w": 6,
-        "x": 12,
-        "y": 13
+        "x": 0,
+        "y": 19
       },
-      "id": 26,
+      "id": 20,
       "legend": {
         "avg": false,
         "current": false,
@@ -1065,25 +1158,18 @@
       "steppedLine": false,
       "targets": [
         {
-          "expr": "rate(canal_instance_client_empty_batches{destination=~\"$destination\"}[2m])",
+          "expr": "canal_instance_store_produce_seq{destination=~\"$destination\"} - canal_instance_store_consume_seq{destination=~\"$destination\"}",
           "format": "time_series",
           "interval": "15s",
           "intervalFactor": 2,
-          "legendFormat": "empty",
+          "legendFormat": "events",
           "refId": "A"
-        },
-        {
-          "expr": "rate(canal_instance_client_packets{destination=~\"$destination\", packetType=\"GET\"}[2m])",
-          "format": "time_series",
-          "intervalFactor": 1,
-          "legendFormat": "nonempty",
-          "refId": "B"
         }
       ],
       "thresholds": [],
       "timeFrom": null,
       "timeShift": null,
-      "title": "Empty packets",
+      "title": "Store remain events",
       "tooltip": {
         "shared": true,
         "sort": 0,
@@ -1099,14 +1185,16 @@
       },
       "yaxes": [
         {
-          "format": "wps",
-          "label": null,
+          "decimals": null,
+          "format": "none",
+          "label": "",
           "logBase": 1,
           "max": null,
           "min": null,
           "show": true
         },
         {
+          "decimals": null,
           "format": "short",
           "label": null,
           "logBase": 1,
@@ -1126,22 +1214,20 @@
       "dashLength": 10,
       "dashes": false,
       "datasource": "$datasource",
-      "description": "Canal client 请求响应时间的概况。",
+      "description": "Canal instance ringbuffer 内未释放events占用内存。",
       "fill": 1,
       "gridPos": {
         "h": 5,
         "w": 6,
-        "x": 18,
-        "y": 13
+        "x": 6,
+        "y": 19
       },
-      "id": 18,
+      "id": 22,
       "legend": {
-        "alignAsTable": false,
         "avg": false,
         "current": false,
         "max": false,
         "min": false,
-        "rightSide": false,
         "show": true,
         "total": false,
         "values": false
@@ -1154,40 +1240,29 @@
       "pointradius": 5,
       "points": false,
       "renderer": "flot",
-      "seriesOverrides": [
-        {
-          "alias": "25.0",
-          "yaxis": 1
-        },
-        {
-          "alias": "100.0",
-          "yaxis": 1
-        }
-      ],
+      "seriesOverrides": [],
       "spaceLength": 10,
       "stack": false,
       "steppedLine": false,
       "targets": [
         {
-          "expr": "rate(canal_instance_client_request_latency_bucket{destination=~\"$destination\"}[2m])",
+          "expr": "(canal_instance_store_produce_mem{destination=~\"$destination\"} - canal_instance_store_consume_mem{destination=~\"$destination\"}) / 1024",
           "format": "time_series",
-          "hide": false,
           "interval": "15s",
           "intervalFactor": 2,
-          "legendFormat": "{{le}}ms",
+          "legendFormat": "memsize",
           "refId": "A"
         }
       ],
       "thresholds": [],
       "timeFrom": null,
       "timeShift": null,
-      "title": "Response time",
+      "title": "Store remain mem",
       "tooltip": {
         "shared": true,
         "sort": 0,
         "value_type": "individual"
       },
-      "transparent": false,
       "type": "graph",
       "xaxis": {
         "buckets": null,
@@ -1198,7 +1273,7 @@
       },
       "yaxes": [
         {
-          "format": "short",
+          "format": "deckbytes",
           "label": null,
           "logBase": 1,
           "max": null,
@@ -1230,9 +1305,8 @@
     "list": [
       {
         "current": {
-          "tags": [],
-          "text": "Prometheus",
-          "value": "Prometheus"
+          "text": "prometheus",
+          "value": "prometheus"
         },
         "hide": 0,
         "label": "datasource",
@@ -1245,10 +1319,7 @@
       },
       {
         "allValue": null,
-        "current": {
-          "text": "example",
-          "value": "example"
-        },
+        "current": {},
         "datasource": "$datasource",
         "hide": 0,
         "includeAll": false,
@@ -1269,7 +1340,7 @@
     ]
   },
   "time": {
-    "from": "now-1h",
+    "from": "now-6h",
     "to": "now"
   },
   "timepicker": {
@@ -1300,5 +1371,5 @@
   "timezone": "",
   "title": "Canal instances",
   "uid": "8vh8NGpiz",
-  "version": 1
+  "version": 103
 }