diff --git a/src/connector/grafana/tdengine/Gruntfile.js b/src/connector/grafana/tdengine/Gruntfile.js index 2f2d8294be8614d30155b652db375806d9a384f4..ad48c7f8483a4ebe1bfbf7f4960c7cd1419fe64a 100755 --- a/src/connector/grafana/tdengine/Gruntfile.js +++ b/src/connector/grafana/tdengine/Gruntfile.js @@ -16,6 +16,11 @@ module.exports = function(grunt) { src: ['**/*', '!**/*.js', '!**/*.scss'], dest: 'dist' }, + dashboard_to_dist: { + expand: true, + src: ['dashboard/*'], + dest: 'dist' + }, pluginDef: { expand: true, src: ['README.md'], @@ -76,5 +81,5 @@ module.exports = function(grunt) { } }); - grunt.registerTask('default', ['clean', 'copy:src_to_dist', 'copy:pluginDef', 'babel', 'mochaTest']); + grunt.registerTask('default', ['clean', 'copy:src_to_dist', 'copy:dashboard_to_dist', 'copy:pluginDef', 'babel', 'mochaTest']); }; diff --git a/src/connector/grafana/tdengine/README.md b/src/connector/grafana/tdengine/README.md index 91dc73daf15c6d4979c41f61f96d87100ec948fc..3012a54e9f34925a21d43c8258e472c49510e999 100644 --- a/src/connector/grafana/tdengine/README.md +++ b/src/connector/grafana/tdengine/README.md @@ -61,7 +61,7 @@ Example response Example request ``` javascript - get request + Get request /heartbeat ``` Example response @@ -70,3 +70,27 @@ Example response "message": "Grafana server receive a quest from you!" } ``` + +### Dev setup + +This plugin requires node 6.10.0 + +``` javascript + +npm install -g yarn +yarn install +npm run build + +``` + +### Import Dashboard + +after login `http://localhost:3000 `, then you can import the tdengine demo dashboard to monitor the system metrics. + +you can import the `dashboard/tdengine-grafana.json`: + +![import_dashboard](dashboard/import_dashboard.png) + +after finished import: + +![import_dashboard](dashboard/tdengine_dashboard.png) diff --git a/src/connector/grafana/tdengine/dashboard/import_dashboard.png b/src/connector/grafana/tdengine/dashboard/import_dashboard.png new file mode 100755 index 0000000000000000000000000000000000000000..00005fad9ae52e3fe2996d34c5e1e7821eb07033 Binary files /dev/null and b/src/connector/grafana/tdengine/dashboard/import_dashboard.png differ diff --git a/src/connector/grafana/tdengine/dashboard/tdengine-grafana.json b/src/connector/grafana/tdengine/dashboard/tdengine-grafana.json new file mode 100755 index 0000000000000000000000000000000000000000..7a002a3d6b5d2f5dbf7c0b29c01dd8931775792c --- /dev/null +++ b/src/connector/grafana/tdengine/dashboard/tdengine-grafana.json @@ -0,0 +1,588 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 3, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "TDengine", + "description": "total select request per minute last hour", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 8, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "次数/min", + "postfixFontSize": "20%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "req_select", + "refId": "A", + "sql": "select sum(req_select) from log.dn where ts >= now-1h and ts < now interval(1m)", + "target": "select metric", + "type": "timeserie" + } + ], + "thresholds": "120,240", + "timeFrom": null, + "timeShift": null, + "title": "req select", + "type": "singlestat", + "valueFontSize": "150%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "TDengine", + "description": "total insert request per minute for last hour", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 6, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "次数/min", + "postfixFontSize": "20%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "req_insert", + "refId": "A", + "sql": "select sum(req_insert) from log.dn where ts >= now-1h and ts < now interval(1m)", + "target": "select metric", + "type": "timeserie" + } + ], + "thresholds": "110,240", + "timeFrom": null, + "timeShift": null, + "title": "req insert", + "type": "singlestat", + "valueFontSize": "150%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "datasource": "TDengine", + "description": "taosd max memery last 10 minutes", + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 6 + }, + "id": 12, + "options": { + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "max": 4096, + "min": 0, + "thresholds": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + }, + { + "color": "#EAB839", + "value": 2048 + } + ], + "unit": "decmbytes" + }, + "override": {}, + "values": false + }, + "orientation": "auto", + "showThresholdLabels": true, + "showThresholdMarkers": true + }, + "pluginVersion": "6.4.3", + "targets": [ + { + "alias": "mem_taosd", + "refId": "A", + "sql": "select max(mem_taosd) from log.dn where ts >= now -10m and ts < now", + "target": "select metric", + "type": "timeserie" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "taosd memery", + "type": "gauge" + }, + { + "datasource": "TDengine", + "description": "max System Memory last 1 hour", + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 6 + }, + "id": 10, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "mappings": [], + "max": 4, + "min": 0, + "thresholds": [ + { + "color": "green", + "value": null + }, + { + "color": "semi-dark-orange", + "value": 60 + }, + { + "color": "dark-red", + "value": 80 + } + ], + "title": "", + "unit": "decmbytes" + }, + "override": {}, + "values": false + }, + "orientation": "auto", + "showThresholdLabels": true, + "showThresholdMarkers": true + }, + "pluginVersion": "6.4.3", + "targets": [ + { + "alias": "mem_system", + "refId": "A", + "sql": "select max(mem_system) from log.dn where ts >= now -10h and ts < now", + "target": "select metric", + "type": "timeserie" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "system memory", + "type": "gauge" + }, + { + "datasource": "TDengine", + "description": "avg band speed last one minute", + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 6 + }, + "id": 14, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "mappings": [], + "max": 8192, + "min": 0, + "thresholds": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 4916 + }, + { + "color": "red", + "value": 6554 + } + ], + "unit": "Kbits" + }, + "override": {}, + "values": false + }, + "orientation": "auto", + "showThresholdLabels": true, + "showThresholdMarkers": true + }, + "pluginVersion": "6.4.3", + "targets": [ + { + "alias": "band_speed", + "refId": "A", + "sql": "select avg(band_speed) from log.dn where ts >= now-1h and ts < now interval(1m)", + "target": "select metric", + "type": "timeserie" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "band speed", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "TDengine", + "description": "monitor system cpu", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 12 + }, + "hideTimeOverride": true, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "6.4.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "cpu_system11", + "hide": false, + "refId": "A", + "sql": "select avg(cpu_system) from log.dn where ts >= now-1h and ts < now interval(1s)", + "target": "select metric", + "type": "timeserie" + }, + { + "alias": "cpu_taosd", + "hide": false, + "refId": "B", + "sql": "select avg(cpu_taosd) from log.dn where ts >= now-1h and ts < now interval(1s)", + "target": "select metric", + "type": "timeserie" + } + ], + "thresholds": [], + "timeFrom": "1h", + "timeRegions": [], + "timeShift": "30s", + "title": "cpu_system", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "percent", + "label": "使用占比", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "TDengine", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 12 + }, + "id": 18, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "refId": "A", + "sql": "select avg(disk_used) disk_used from log.dn where ts >= $from and ts < $to interval(1s) group by ipaddr", + "target": "select metric", + "type": "timeserie" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "avg_disk_used", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decgbytes", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "5s", + "schemaVersion": 20, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "TDengine", + "uid": "FE-vpe0Wk", + "version": 1 +} \ No newline at end of file diff --git a/src/connector/grafana/tdengine/dashboard/tdengine_dashboard.png b/src/connector/grafana/tdengine/dashboard/tdengine_dashboard.png new file mode 100755 index 0000000000000000000000000000000000000000..a4b6a7669a47aeb44734b1c8e3241e9439c19ab7 Binary files /dev/null and b/src/connector/grafana/tdengine/dashboard/tdengine_dashboard.png differ diff --git a/src/connector/grafana/tdengine/dist/README.md b/src/connector/grafana/tdengine/dist/README.md index 91dc73daf15c6d4979c41f61f96d87100ec948fc..3012a54e9f34925a21d43c8258e472c49510e999 100644 --- a/src/connector/grafana/tdengine/dist/README.md +++ b/src/connector/grafana/tdengine/dist/README.md @@ -61,7 +61,7 @@ Example response Example request ``` javascript - get request + Get request /heartbeat ``` Example response @@ -70,3 +70,27 @@ Example response "message": "Grafana server receive a quest from you!" } ``` + +### Dev setup + +This plugin requires node 6.10.0 + +``` javascript + +npm install -g yarn +yarn install +npm run build + +``` + +### Import Dashboard + +after login `http://localhost:3000 `, then you can import the tdengine demo dashboard to monitor the system metrics. + +you can import the `dashboard/tdengine-grafana.json`: + +![import_dashboard](dashboard/import_dashboard.png) + +after finished import: + +![import_dashboard](dashboard/tdengine_dashboard.png) diff --git a/src/connector/grafana/tdengine/dist/dashboard/import_dashboard.png b/src/connector/grafana/tdengine/dist/dashboard/import_dashboard.png new file mode 100644 index 0000000000000000000000000000000000000000..00005fad9ae52e3fe2996d34c5e1e7821eb07033 Binary files /dev/null and b/src/connector/grafana/tdengine/dist/dashboard/import_dashboard.png differ diff --git a/src/connector/grafana/tdengine/dist/dashboard/tdengine-grafana.json b/src/connector/grafana/tdengine/dist/dashboard/tdengine-grafana.json new file mode 100644 index 0000000000000000000000000000000000000000..7a002a3d6b5d2f5dbf7c0b29c01dd8931775792c --- /dev/null +++ b/src/connector/grafana/tdengine/dist/dashboard/tdengine-grafana.json @@ -0,0 +1,588 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 3, + "links": [], + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "TDengine", + "description": "total select request per minute last hour", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 8, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "次数/min", + "postfixFontSize": "20%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "req_select", + "refId": "A", + "sql": "select sum(req_select) from log.dn where ts >= now-1h and ts < now interval(1m)", + "target": "select metric", + "type": "timeserie" + } + ], + "thresholds": "120,240", + "timeFrom": null, + "timeShift": null, + "title": "req select", + "type": "singlestat", + "valueFontSize": "150%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "TDengine", + "description": "total insert request per minute for last hour", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 6, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "options": {}, + "postfix": "次数/min", + "postfixFontSize": "20%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "alias": "req_insert", + "refId": "A", + "sql": "select sum(req_insert) from log.dn where ts >= now-1h and ts < now interval(1m)", + "target": "select metric", + "type": "timeserie" + } + ], + "thresholds": "110,240", + "timeFrom": null, + "timeShift": null, + "title": "req insert", + "type": "singlestat", + "valueFontSize": "150%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + }, + { + "datasource": "TDengine", + "description": "taosd max memery last 10 minutes", + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 6 + }, + "id": 12, + "options": { + "fieldOptions": { + "calcs": [ + "mean" + ], + "defaults": { + "mappings": [], + "max": 4096, + "min": 0, + "thresholds": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + }, + { + "color": "#EAB839", + "value": 2048 + } + ], + "unit": "decmbytes" + }, + "override": {}, + "values": false + }, + "orientation": "auto", + "showThresholdLabels": true, + "showThresholdMarkers": true + }, + "pluginVersion": "6.4.3", + "targets": [ + { + "alias": "mem_taosd", + "refId": "A", + "sql": "select max(mem_taosd) from log.dn where ts >= now -10m and ts < now", + "target": "select metric", + "type": "timeserie" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "taosd memery", + "type": "gauge" + }, + { + "datasource": "TDengine", + "description": "max System Memory last 1 hour", + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 6 + }, + "id": 10, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "mappings": [], + "max": 4, + "min": 0, + "thresholds": [ + { + "color": "green", + "value": null + }, + { + "color": "semi-dark-orange", + "value": 60 + }, + { + "color": "dark-red", + "value": 80 + } + ], + "title": "", + "unit": "decmbytes" + }, + "override": {}, + "values": false + }, + "orientation": "auto", + "showThresholdLabels": true, + "showThresholdMarkers": true + }, + "pluginVersion": "6.4.3", + "targets": [ + { + "alias": "mem_system", + "refId": "A", + "sql": "select max(mem_system) from log.dn where ts >= now -10h and ts < now", + "target": "select metric", + "type": "timeserie" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "system memory", + "type": "gauge" + }, + { + "datasource": "TDengine", + "description": "avg band speed last one minute", + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 6 + }, + "id": 14, + "options": { + "fieldOptions": { + "calcs": [ + "last" + ], + "defaults": { + "mappings": [], + "max": 8192, + "min": 0, + "thresholds": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 4916 + }, + { + "color": "red", + "value": 6554 + } + ], + "unit": "Kbits" + }, + "override": {}, + "values": false + }, + "orientation": "auto", + "showThresholdLabels": true, + "showThresholdMarkers": true + }, + "pluginVersion": "6.4.3", + "targets": [ + { + "alias": "band_speed", + "refId": "A", + "sql": "select avg(band_speed) from log.dn where ts >= now-1h and ts < now interval(1m)", + "target": "select metric", + "type": "timeserie" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "band speed", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "cacheTimeout": null, + "dashLength": 10, + "dashes": false, + "datasource": "TDengine", + "description": "monitor system cpu", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 12 + }, + "hideTimeOverride": true, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pluginVersion": "6.4.3", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "cpu_system11", + "hide": false, + "refId": "A", + "sql": "select avg(cpu_system) from log.dn where ts >= now-1h and ts < now interval(1s)", + "target": "select metric", + "type": "timeserie" + }, + { + "alias": "cpu_taosd", + "hide": false, + "refId": "B", + "sql": "select avg(cpu_taosd) from log.dn where ts >= now-1h and ts < now interval(1s)", + "target": "select metric", + "type": "timeserie" + } + ], + "thresholds": [], + "timeFrom": "1h", + "timeRegions": [], + "timeShift": "30s", + "title": "cpu_system", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "percent", + "label": "使用占比", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": false + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "TDengine", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 12 + }, + "id": 18, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "", + "refId": "A", + "sql": "select avg(disk_used) disk_used from log.dn where ts >= $from and ts < $to interval(1s) group by ipaddr", + "target": "select metric", + "type": "timeserie" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "avg_disk_used", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decgbytes", + "label": "", + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "5s", + "schemaVersion": 20, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + "title": "TDengine", + "uid": "FE-vpe0Wk", + "version": 1 +} \ No newline at end of file diff --git a/src/connector/grafana/tdengine/dist/dashboard/tdengine_dashboard.png b/src/connector/grafana/tdengine/dist/dashboard/tdengine_dashboard.png new file mode 100644 index 0000000000000000000000000000000000000000..a4b6a7669a47aeb44734b1c8e3241e9439c19ab7 Binary files /dev/null and b/src/connector/grafana/tdengine/dist/dashboard/tdengine_dashboard.png differ