From 0362ce2afcafe213782ad28fdff64ac73017d15b Mon Sep 17 00:00:00 2001
From: jianxiaoguo <842666271@qq.com>
Date: Thu, 18 Aug 2022 10:57:04 +0800
Subject: [PATCH] chore(grafana): influx dashborad disk size

---
 .../dashboards/drycc_component_health.json    | 82 ++++---------------
 .../share/grafana/api/dashboards/influx.json  |  6 +-
 .../grafana/api/dashboards/kube_health.json   |  2 +-
 3 files changed, 21 insertions(+), 69 deletions(-)

diff --git a/grafana/rootfs/usr/share/grafana/api/dashboards/drycc_component_health.json b/grafana/rootfs/usr/share/grafana/api/dashboards/drycc_component_health.json
index 3c8826e..cd65592 100644
--- a/grafana/rootfs/usr/share/grafana/api/dashboards/drycc_component_health.json
+++ b/grafana/rootfs/usr/share/grafana/api/dashboards/drycc_component_health.json
@@ -22,7 +22,7 @@
     "editable": true,
     "fiscalYearStartMonth": 0,
     "graphTooltip": 0,
-    "id": 6,
+    "id": null,
     "links": [],
     "liveNow": false,
     "panels": [
@@ -314,10 +314,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -428,10 +425,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -554,10 +548,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -668,10 +659,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -794,10 +782,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -908,10 +893,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -1265,10 +1247,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -1377,10 +1356,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -1963,10 +1939,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -2075,10 +2048,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -2431,10 +2401,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -2543,10 +2510,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -2669,10 +2633,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -2783,10 +2744,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -2909,10 +2867,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
@@ -3023,10 +2978,7 @@
             "targets": [
               {
                 "alias": "$tag_pod_name",
-                "datasource": {
-                  "type": "influxdb",
-                  "uid": "hg0D_Li4z"
-                },
+                "datasource": null,
                 "dsType": "influxdb",
                 "groupBy": [
                   {
diff --git a/grafana/rootfs/usr/share/grafana/api/dashboards/influx.json b/grafana/rootfs/usr/share/grafana/api/dashboards/influx.json
index a2bce1f..4b69752 100644
--- a/grafana/rootfs/usr/share/grafana/api/dashboards/influx.json
+++ b/grafana/rootfs/usr/share/grafana/api/dashboards/influx.json
@@ -348,14 +348,14 @@
             "measurement": "kubernetes_pod_container",
             "orderByTime": "ASC",
             "policy": "default",
-            "query": "from(bucket: v.bucket)\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"kubernetes_pod_container\")\n  |> filter(fn: (r) => r[\"_field\"] == \"memory_usage_bytes\")\n  |> filter(fn: (r) => r[\"container_name\"] =~ /drycc-influxdb/)\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"mean\")",
+            "query": "from(bucket: v.bucket)\n  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\n  |> filter(fn: (r) => r[\"_measurement\"] == \"storage_shard_disk_size\")\n  |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\n  |> yield(name: \"mean\")",
             "refId": "A",
             "resultFormat": "time_series",
             "select": [
               [
                 {
                   "params": [
-                    "memory_usage_bytes"
+                    "storage_shard_disk_size"
                   ],
                   "type": "field"
                 },
@@ -375,7 +375,7 @@
           }
         ],
         "thresholds": "",
-        "title": "Memory",
+        "title": "Shard disk size",
         "type": "singlestat",
         "valueFontSize": "200%",
         "valueMaps": [
diff --git a/grafana/rootfs/usr/share/grafana/api/dashboards/kube_health.json b/grafana/rootfs/usr/share/grafana/api/dashboards/kube_health.json
index ac3894f..0cf95d4 100644
--- a/grafana/rootfs/usr/share/grafana/api/dashboards/kube_health.json
+++ b/grafana/rootfs/usr/share/grafana/api/dashboards/kube_health.json
@@ -22,7 +22,7 @@
     "editable": true,
     "fiscalYearStartMonth": 0,
     "graphTooltip": 0,
-    "id": 3,
+    "id": null,
     "iteration": 1660728936662,
     "links": [],
     "liveNow": false,
