From 60236a9bd6b6b780406868597ce1e8dc7adf2309 Mon Sep 17 00:00:00 2001 From: zhangchengwei Date: Thu, 6 Dec 2018 14:24:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=9B=E5=BB=BAJSON?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AKAOnlineEnv/CreateDemo/Minio_Demo.json | 2085 +++++++++++++++++ AKAOnlineEnv/CreateDemo/config.py | 16 + .../CreateDemo/create_Astana_grafana.tar.gz | Bin 6369 -> 0 bytes .../CreateDemo/create_Minio_Astana.py | 103 + 4 files changed, 2204 insertions(+) create mode 100644 AKAOnlineEnv/CreateDemo/Minio_Demo.json create mode 100644 AKAOnlineEnv/CreateDemo/config.py delete mode 100644 AKAOnlineEnv/CreateDemo/create_Astana_grafana.tar.gz create mode 100644 AKAOnlineEnv/CreateDemo/create_Minio_Astana.py diff --git a/AKAOnlineEnv/CreateDemo/Minio_Demo.json b/AKAOnlineEnv/CreateDemo/Minio_Demo.json new file mode 100644 index 0000000..364a16a --- /dev/null +++ b/AKAOnlineEnv/CreateDemo/Minio_Demo.json @@ -0,0 +1,2085 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS_ASTANA", + "label": "Prometheus_Astana", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "5.3.2" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "5.0.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "5.0.0" + }, + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "5.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "5.0.0" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "minio dashboard", + "editable": true, + "gnetId": 6248, + "graphTooltip": 0, + "id": null, + "iteration": 1544007049181, + "links": [], + "panels": [ + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 155, + "panels": [ + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "${DS_PROMETHEUS_ASTANA}", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 5, + "x": 0, + "y": 4 + }, + "id": 145, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "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": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(minio_total_disks{job=\"minio_filelog_astana\"})", + "format": "time_series", + "intervalFactor": 1, + "refId": "A" + } + ], + "thresholds": "", + "title": "TotalDiskNum", + "transparent": false, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "${DS_PROMETHEUS_ASTANA}", + "format": "none", + "gauge": { + "maxValue": 8, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 5, + "x": 5, + "y": 4 + }, + "id": 144, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "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": false + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(minio_total_disks{job=\"minio_filelog_astana\"}) - sum(minio_offline_disks{job=\"minio_filelog_astana\"})", + "format": "time_series", + "intervalFactor": 1, + "refId": "A" + } + ], + "thresholds": "", + "title": "ActiveDiskNum", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "#299c46", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "${DS_PROMETHEUS_ASTANA}", + "decimals": null, + "format": "bytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": false + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 10, + "y": 4 + }, + "id": 143, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "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 + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(minio_disk_storage_used_bytes{job=\"minio_filelog_astana\"})", + "format": "time_series", + "intervalFactor": 1, + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "title": "DiskUsedBytes", + "transparent": false, + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": false, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "datasource": "${DS_PROMETHEUS_ASTANA}", + "description": "Start time of the Minio server\nminio服务开始运行的时间", + "format": "dtdurations", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": false + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 4 + }, + "id": 142, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "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 + }, + "tableColumn": "", + "targets": [ + { + "expr": "time() - max(process_start_time_seconds)", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Start time of the Minio server", + "metric": "process_start_time_seconds", + "refId": "A", + "step": 60 + } + ], + "thresholds": "", + "title": "Uptime", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "columns": [], + "datasource": "${DS_PROMETHEUS_ASTANA}", + "fontSize": "100%", + "gridPos": { + "h": 27, + "w": 11, + "x": 0, + "y": 8 + }, + "id": 37, + "links": [], + "pageSize": null, + "repeat": null, + "repeatDirection": "h", + "scroll": true, + "showHeader": true, + "sort": { + "col": 2, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "State", + "colorMode": "cell", + "colors": [ + "#bf1b00", + "rgb(22, 191, 17)", + "#bf1b00" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "mappingType": 1, + "pattern": "Value", + "preserveFormat": false, + "sanitize": false, + "thresholds": [ + "1" + ], + "type": "string", + "unit": "short", + "valueMaps": [ + { + "text": "up", + "value": "1" + }, + { + "text": "down", + "value": "0" + } + ] + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "__name__", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "progress", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "job", + "thresholds": [], + "type": "number", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "expr": "up{job=\"minio_filelog_astana\"}", + "format": "table", + "instant": true, + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "NodeActiveState", + "transform": "table", + "type": "table" + }, + { + "columns": [], + "datasource": "${DS_PROMETHEUS_ASTANA}", + "fontSize": "100%", + "gridPos": { + "h": 27, + "w": 13, + "x": 11, + "y": 8 + }, + "id": 36, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 2, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "__name__", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "MemTotal(bytes)", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "mappingType": 1, + "pattern": "Value #A", + "thresholds": [], + "type": "number", + "unit": "none" + }, + { + "alias": "MemUsed(bytes)", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": null, + "mappingType": 1, + "pattern": "Value #B", + "thresholds": [], + "type": "number", + "unit": "none" + }, + { + "alias": "MemUsedRate", + "colorMode": "cell", + "colors": [ + "rgb(61, 186, 26)", + "rgb(222, 102, 22)", + "rgb(191, 0, 37)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 1, + "mappingType": 1, + "pattern": "Value #C", + "thresholds": [ + "0.6", + "0.8" + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "job", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "MemUsedRate", + "colorMode": "cell", + "colors": [ + "rgba(44, 193, 38, 0.97)", + "rgba(237, 129, 40, 0.89)", + "rgba(245, 54, 54, 0.9)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #D", + "thresholds": [ + "0.6", + "0.8" + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "decimals": 2, + "pattern": "/.*/", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "expr": "node_memory_MemTotal_bytes{job=\"os_filelog_astana\"} ", + "format": "table", + "instant": true, + "intervalFactor": 1, + "refId": "A" + }, + { + "expr": "node_memory_MemTotal_bytes{job=\"os_filelog_astana\"} - node_memory_MemAvailable_bytes{job=\"os_filelog_astana\"}", + "format": "table", + "instant": true, + "intervalFactor": 1, + "refId": "B" + }, + { + "expr": "(node_memory_MemTotal_bytes{job=\"os_filelog_astana\"} - node_memory_MemFree_bytes{job=\"os_filelog_astana\"} - node_memory_Buffers_bytes{job=\"os_filelog_astana\"} - node_memory_Cached_bytes{job=\"os_filelog_astana\"}) / (node_memory_MemTotal_bytes{job=\"os_filelog_astana\"} )", + "format": "table", + "instant": true, + "intervalFactor": 1, + "refId": "D" + }, + { + "expr": "(node_memory_MemTotal_bytes{job=\"os_filelog_astana\"} - node_memory_MemAvailable_bytes{job=\"os_filelog_astana\"}) / node_memory_MemTotal_bytes{job=\"os_filelog_astana\"} ", + "format": "table", + "hide": true, + "instant": true, + "intervalFactor": 1, + "refId": "C" + } + ], + "title": "MemSpaceState", + "transform": "table", + "type": "table" + }, + { + "columns": [ + { + "hidden": false, + "style": { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "type": "date" + }, + "text": "Time", + "title": "Time", + "type": "time" + } + ], + "datasource": "${DS_PROMETHEUS_ASTANA}", + "fontSize": "100%", + "gridPos": { + "h": 26, + "w": 24, + "x": 0, + "y": 35 + }, + "hideTimeOverride": false, + "id": 35, + "interval": "", + "links": [], + "minSpan": 11, + "pageSize": null, + "repeatDirection": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 4, + "desc": false + }, + "styles": [ + { + "alias": "Time", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "link": false, + "pattern": "Time", + "type": "date" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "__name__", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "fstype", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "job", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "mountpoint", + "thresholds": [], + "type": "hidden", + "unit": "short" + }, + { + "alias": "DiskUsedRate", + "colorMode": "cell", + "colors": [ + "rgba(30, 210, 22, 0.97)", + "rgba(237, 129, 40, 0.89)", + "#bf1b00" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "mappingType": 1, + "pattern": "Value #C", + "thresholds": [ + "0.6", + "0.8" + ], + "type": "number", + "unit": "percentunit" + }, + { + "alias": "DiskTotalSize(bytes)", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": null, + "mappingType": 1, + "pattern": "Value #A", + "thresholds": [], + "type": "number", + "unit": "none" + }, + { + "alias": "DiskUsedSize(bytes)", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "mappingType": 1, + "pattern": "Value #B", + "thresholds": [], + "type": "number", + "unit": "none" + } + ], + "targets": [ + { + "expr": "node_filesystem_size_bytes{job=\"os_filelog_astana\",device=\"/dev/sdb1\",fstype=\"xfs\",mountpoint=\"/home\"}", + "format": "table", + "instant": true, + "interval": "30s", + "intervalFactor": 1, + "refId": "A" + }, + { + "expr": "node_filesystem_size_bytes{job=\"os_filelog_astana\",device=\"/dev/sdb1\",fstype=\"xfs\",mountpoint=\"/home\"} - node_filesystem_avail_bytes{job=\"os_filelog_astana\",device=\"/dev/sdb1\",fstype=\"xfs\",mountpoint=\"/home\"}", + "format": "table", + "instant": true, + "intervalFactor": 1, + "refId": "B" + }, + { + "expr": "(node_filesystem_size_bytes{job=\"os_filelog_astana\",device=\"/dev/sdb1\",fstype=\"xfs\",mountpoint=\"/home\"} - node_filesystem_avail_bytes{job=\"os_filelog_astana\",device=\"/dev/sdb1\",fstype=\"xfs\",mountpoint=\"/home\"}) / node_filesystem_size_bytes{job=\"os_filelog_astana\",device=\"/dev/sdb1\",fstype=\"xfs\",mountpoint=\"/home\"}", + "format": "table", + "instant": true, + "intervalFactor": 1, + "refId": "C" + } + ], + "title": "DiskSpaceState", + "transform": "table", + "transparent": false, + "type": "table" + } + ], + "title": "NodeState", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 153, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "decimals": null, + "description": "Data sent by current Minio server instance \n当前minio服务器实例发送的数据", + "fill": 1, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 4 + }, + "id": 141, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(minio_network_sent_bytes_total{job=\"minio_filelog_astana\"}[1m]))", + "format": "time_series", + "instant": false, + "intervalFactor": 2, + "legendFormat": "SENT", + "metric": "minio_network_sent_bytes_total", + "refId": "A", + "step": 10 + }, + { + "expr": "sum(rate(minio_network_received_bytes_total{job=\"minio_filelog_astana\"}[1m]))", + "format": "time_series", + "instant": false, + "intervalFactor": 2, + "legendFormat": "RECEIVE", + "metric": "minio_network_sent_bytes_total", + "refId": "B", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Total Data Recvied&Sent", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "decimals": null, + "description": "Data sent by current Minio server instance \n当前minio服务器实例发送的数据", + "fill": 1, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 4 + }, + "id": 140, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "topk(2, (sum(rate(minio_network_sent_bytes_total{job=\"minio_filelog_astana\"}[1m])) by (instance)))", + "format": "time_series", + "hide": false, + "instant": false, + "intervalFactor": 2, + "legendFormat": "{{instance}}Send", + "metric": "minio_network_sent_bytes_total", + "refId": "A", + "step": 10 + }, + { + "expr": "topk(2, (sum(rate(minio_network_received_bytes_total{job=\"minio_filelog_astana\"}[1m])) by (instance)))", + "format": "time_series", + "hide": false, + "instant": false, + "intervalFactor": 2, + "legendFormat": "{{instance}}Receive", + "metric": "minio_network_sent_bytes_total", + "refId": "B", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "TOP2 Data Recvied&Sent", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "decimals": null, + "description": "Data received by current Minio server instance\n当前minio服务器实例接收到的数据", + "fill": 1, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 10 + }, + "id": 108, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(minio_network_sent_bytes_total{instance=\"10.4.35.1:9000\",job=\"minio_filelog_astana\"}[1m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Send", + "metric": "minio_network_received_bytes_total", + "refId": "A", + "step": 10 + }, + { + "expr": "rate(minio_network_received_bytes_total{instance=\"10.4.35.1:9000\",job=\"minio_filelog_astana\"}[1m])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Receive", + "metric": "minio_network_received_bytes_total", + "refId": "B", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "DataReceived&Sent", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "title": "HttpSend&Receivebytes", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 151, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "description": "总数", + "fill": 1, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 4 + }, + "id": 106, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(increase(minio_http_requests_duration_seconds_count{job=\"minio_filelog_astana\",request_type=\"GET\"}[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "GET", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "A", + "step": 4 + }, + { + "expr": "sum(increase(minio_http_requests_duration_seconds_count{job=\"minio_filelog_astana\",request_type=\"PUT\"}[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "PUT", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "B", + "step": 4 + }, + { + "expr": "sum(increase(minio_http_requests_duration_seconds_count{job=\"minio_filelog_astana\",request_type=\"DELETE\"}[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "DELETE", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "C", + "step": 4 + }, + { + "expr": "sum(increase(minio_http_requests_duration_seconds_count{job=\"minio_filelog_astana\",request_type=\"POST\"}[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "POST", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "D", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Total HttpRequestNum", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "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 + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "description": "总数", + "fill": 1, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 4 + }, + "id": 105, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "topk(2, (sum(increase(minio_http_requests_duration_seconds_count{job=\"minio_filelog_astana\",request_type=\"GET\"}[1m])) by(instance)))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{instance}}GET", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "A", + "step": 4 + }, + { + "expr": "topk(2, (sum(increase(minio_http_requests_duration_seconds_count{job=\"minio_filelog_astana\",request_type=\"PUT\"}[1m])) by(instance)))", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{instance}}PUT", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "B", + "step": 4 + }, + { + "expr": "topk(2, (sum(increase(minio_http_requests_duration_seconds_count{job=\"minio_filelog_astana\",request_type=\"DELETE\"}[1m])) by(instance)))", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{instance}}DELETE", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "C", + "step": 4 + }, + { + "expr": "topk(2, (sum(increase(minio_http_requests_duration_seconds_count{job=\"minio_filelog_astana\",request_type=\"POST\"}[1m])) by(instance)))", + "format": "time_series", + "hide": false, + "intervalFactor": 2, + "legendFormat": "{{instance}}POST", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "D", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "TOP2 HttpRequestNum", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "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 + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "description": "总数", + "fill": 1, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 10 + }, + "id": 73, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(increase(minio_http_requests_duration_seconds_count{instance=\"10.4.35.1:9000\",job=\"minio_filelog_astana\",request_type=\"GET\"}[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "GET", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "A", + "step": 4 + }, + { + "expr": "sum(increase(minio_http_requests_duration_seconds_count{instance=\"10.4.35.1:9000\",job=\"minio_filelog_astana\",request_type=\"PUT\"}[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "PUT", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "B", + "step": 4 + }, + { + "expr": "sum(increase(minio_http_requests_duration_seconds_count{instance=\"10.4.35.1:9000\",job=\"minio_filelog_astana\",request_type=\"DELETE\"}[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "DELETE", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "C", + "step": 4 + }, + { + "expr": "sum(increase(minio_http_requests_duration_seconds_count{instance=\"10.4.35.1:9000\",job=\"minio_filelog_astana\",request_type=\"POST\"}[1m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "POST", + "metric": "minio_http_requests_duration_seconds_count", + "refId": "D", + "step": 4 + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "HttpRequestNum", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "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 + } + } + ], + "title": "HttpSend&ReceiveNum", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 149, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "fill": 1, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 71, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"GET\"}[1m]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "GET", + "refId": "A" + }, + { + "expr": "sum(rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"POST\"}[1m]))", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "POST", + "refId": "B" + }, + { + "expr": "sum(rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"PUT\"}[1m]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "PUT", + "refId": "C" + }, + { + "expr": "sum(rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"HEAD\"}[1m]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "HEAD", + "refId": "D" + }, + { + "expr": "sum(rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"DELETE\"}[1m]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "DELETE", + "refId": "E" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Total HTTP Requests duration/s", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "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 + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "fill": 1, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 10 + }, + "id": 39, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"GET\",instance=\"10.4.35.1:9000\"}[1m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "GET", + "refId": "A" + }, + { + "expr": "rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"POST\",instance=\"10.4.35.1:9000\"}[1m])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "POST", + "refId": "B" + }, + { + "expr": "rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"PUT\",instance=\"10.4.35.1:9000\"}[1m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "PUT", + "refId": "C" + }, + { + "expr": "rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"HEAD\",instance=\"10.4.35.1:9000\"}[1m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "HEAD", + "refId": "D" + }, + { + "expr": "rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"DELETE\",instance=\"10.4.35.1:9000\"}[1m])", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "DELETE", + "refId": "E" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "HTTP Requests duration/s", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "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 + } + } + ], + "title": "HttpDutations", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 147, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "fill": 1, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 59 + }, + "id": 34, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "topk(2, (sum(irate(node_cpu_seconds_total{job=\"os_filelog_astana\",mode!=\"idle\"}[1m])) by (instance)))", + "format": "time_series", + "hide": false, + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "TOP2 CPUUsedRate", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "fill": 1, + "gridPos": { + "h": 6, + "w": 6, + "x": 0, + "y": 64 + }, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(irate(node_cpu_seconds_total{instance=\"10.4.35.1:9100\",job=\"os_filelog_astana\",mode!=\"idle\"}[1m]))", + "format": "time_series", + "hide": false, + "instant": false, + "intervalFactor": 1, + "legendFormat": "CPU Used Percent", + "refId": "A" + }, + { + "expr": "1 - (avg(irate(node_cpu_seconds_total{instance=\"10.4.35.1:9100\",job=\"os_filelog_astana\",mode=\"idle\"}[1m])))", + "format": "time_series", + "hide": true, + "intervalFactor": 1, + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "CPUUsedRate", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "percentunit", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "title": "NodeCPUState", + "type": "row" + } + ], + "refresh": "15m", + "schemaVersion": 16, + "style": "dark", + "tags": [ + "object-storage" + ], + "templating": { + "list": [ + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "instance", + "options": [], + "query": "label_values(minio_total_disks,instance)", + "refresh": 1, + "regex": "/([a-zA-Z]{1,})/i", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_PROMETHEUS_ASTANA}", + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "metrics_port", + "options": [], + "query": "label_values(minio_total_disks,instance)", + "refresh": 1, + "regex": "/(\\d{1,4})/i", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "Minio_Filelog_Astana", + "uid": "minio_filelog_astana", + "version": 8 +} diff --git a/AKAOnlineEnv/CreateDemo/config.py b/AKAOnlineEnv/CreateDemo/config.py new file mode 100644 index 0000000..82a396d --- /dev/null +++ b/AKAOnlineEnv/CreateDemo/config.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# -*- coding:utf-8 -*- + +import os +import sys + +ip_list = [ +"10.4.35.41", +"10.4.35.42", +"10.4.35.43", +"10.4.35.44", +"10.4.35.45", +"10.4.35.46", +"10.4.35.47", +"10.4.35.48" +] diff --git a/AKAOnlineEnv/CreateDemo/create_Astana_grafana.tar.gz b/AKAOnlineEnv/CreateDemo/create_Astana_grafana.tar.gz deleted file mode 100644 index 9e266009b308677f9271980e5bf11626c96bd6e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6369 zcmb7|MN||H!0qX-p+i6#L}CD8=#uX45b2O^>5y)R?idD;l13T?1z{+M?nb&9V7~wN z7H{!(Z*$LG-0eO0+#h2i4$4U`jyVeYi3P%aTQSrj!-dZ1%6qOtss7K0~+^(X1Cv@H0fO~f^W%xQ*(uFwdRtS6itWFG27+A>n=6McqugLaykI(~nxN%_rMg z|GWBIx-68uA{u(Q$kuD`+%??+^E_6oNfv zZ8GKszfn-(jJ6Q~a08kI0JS7d6wHQfHns0vljBsFY1p9Y%3iD)4DqbW%v>4D8LS!X z@vN%M&sG0xDnCb=fliuQgzXzDd{rYRlA~ncr5>%wHq}M;iIci#!i+ zji)#z=_^@1^L^7FH&}!tnG2A1)yP^e=tGLuw*((&!Y5;TIDq%OT?cJy{VLSD zsI(1Lol3YZi%z7$YIUWzInYJTWPQo9uZ@?yYsB=3*Rj+~#PvJj3i|=57bOPIsUN!7 zwR=<*kr3;(B99L*gVrDA(060Wz`!jkvj>GvN=Nf~bBX*s2$4RCuhKK~RsE(-T)0l}ID1Ant{-F-h+NoZGEG&J^u9PI}# zRvRf)G&yC-czgiXm7jRfcnE`}{+s9wd4kA!9-fQdqzg4QxsF%-{OMEy@Y8S)MLoFV zFR|#m>_1?q^3kPai+6mK0XV&z#j2J4YKgmqA zwYy3d*0rG_x|Qa!!cb$&Ov4`DFHgYRM%DAqxRK}@7H9j~N>d_OnFanKtd-6_?wEn9 z>~jx3*^U=zw?wVA*dva#Yn2LM=*SSGZxuZm=gJ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3|OP940R zqe3qS@tGqNElD=U!kMc%9obZL(w=Y=BI`U902@OR!3CY0ni|UINKD>!Q%YZgbEFzY z(>}7{H}@-bs9_G$oq4kf86sd5e0Cvjp?Gz^4&RX8r#nx@LWV`Vc&@0e9xHWZGiy&2i5qK941`f?HO|Gc)9w6!I(pdHyf-2J%b`c@~2_ zV?mzTALGFnh}s0ZyX=@HQqQT?i)$d8-N*`jf*C)dAG76o4}jQX;K=V%xOFt3#M`dfi6`= zl^WZOH@Ow6?Ej0j|6g14UiW`#_OFLg>$wo}7a%>Ah4_~ggu$>caraKT{_P9M<$TI( z)-`IkyJi|BB;Fuw@KLncE4^ZBWpr~j?5}XECjQfd5p0`xKw3-Ua`bm6GA0Q YW9taa{~w8o*hHc(X8D$*$e^P94^gd6IsgCw diff --git a/AKAOnlineEnv/CreateDemo/create_Minio_Astana.py b/AKAOnlineEnv/CreateDemo/create_Minio_Astana.py new file mode 100644 index 0000000..644bffd --- /dev/null +++ b/AKAOnlineEnv/CreateDemo/create_Minio_Astana.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python +# -*- coding:utf-8 -*- +import os +import sys +import json +import copy + +from collections import OrderedDict +from config import ip_list + +def main(): + panel_id = 1 + load_dict = {} + panels = [] + for i in ip_list: + print i + with open("./Minio_Demo.json",'r') as load_f: + load_dict = json.load(load_f, object_pairs_hook=OrderedDict) + panels = copy.deepcopy(load_dict['panels']) + for item in reversed(panels): + item['id'] = panel_id + panel_id += 1 + if item['title'] == 'NodeCPUState': + panel = item['panels'] + for pa in reversed(panel): + pa['id'] = panel_id + panel_id += 1 + if pa['title'] == 'CPUUsedRate': + n = panel.index(pa) + for ip in ip_list: + tmp = copy.deepcopy(pa) + tmp['targets'][0]["expr"] = "sum(irate(node_cpu_seconds_total{instance=\"%s:9100\",job=\"os_filelog_astana\",mode!=\"idle\"}[1m]))"%ip + tmp['targets'][1]["expr"] = "1 - (avg(irate(node_cpu_seconds_total{instance=\"%s:9100\",job=\"os_filelog_astana\",mode=\"idle\"}[1m])))"%ip + tmp['id'] = panel_id + panel_id += 1 + tmp['title'] = "%sCPUUsedRate"%ip + panel.insert(n, tmp) + n += 1 + panel.remove(pa) + elif item['title'] == 'HttpDutations': + panel = item['panels'] + for pa in reversed(panel): + pa['id'] = panel_id + panel_id += 1 + if pa['title'] == 'HTTP Requests duration/s': + n = panel.index(pa) + for ip in ip_list: + tmp = copy.deepcopy(pa) + tmp['targets'][0]["expr"] = "rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"GET\",instance=\"%s:9000\"}[1m])"%ip + tmp['targets'][1]["expr"] = "rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"POST\",instance=\"%s:9000\"}[1m])"%ip + tmp['targets'][2]["expr"] = "rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"PUT\",instance=\"%s:9000\"}[1m])"%ip + tmp['targets'][3]["expr"] = "rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"HEAD\",instance=\"%s:9000\"}[1m])"%ip + tmp['targets'][4]["expr"] = "rate(minio_http_requests_duration_seconds_sum{job=\"minio_filelog_astana\",request_type=\"DELETE\",instance=\"%s:9000\"}[1m])"%ip + tmp['id'] = panel_id + panel_id += 1 + tmp['title'] = "%sHTTP Requests duration/s"%ip + panel.insert(n, tmp) + n += 1 + panel.remove(pa) + elif item['title'] == 'HttpSend&ReceiveNum': + panel = item['panels'] + for pa in reversed(panel): + pa['id'] = panel_id + panel_id += 1 + if pa['title'] == 'HttpRequestNum': + n = panel.index(pa) + for ip in ip_list: + tmp = copy.deepcopy(pa) + tmp['targets'][0]["expr"] = "sum(increase(minio_http_requests_duration_seconds_count{instance=\"%s:9000\",job=\"minio_filelog_astana\",request_type=\"GET\"}[1m]))"%ip + tmp['targets'][1]["expr"] = "sum(increase(minio_http_requests_duration_seconds_count{instance=\"%s:9000\",job=\"minio_filelog_astana\",request_type=\"PUT\"}[1m]))"%ip + tmp['targets'][2]["expr"] = "sum(increase(minio_http_requests_duration_seconds_count{instance=\"%s:9000\",job=\"minio_filelog_astana\",request_type=\"DELETE\"}[1m]))"%ip + tmp['targets'][3]["expr"] = "sum(increase(minio_http_requests_duration_seconds_count{instance=\"%s:9000\",job=\"minio_filelog_astana\",request_type=\"POST\"}[1m]))"%ip + tmp['id'] = panel_id + panel_id += 1 + tmp['title'] = "%sHttpRequestNum"%ip + panel.insert(n, tmp) + n += 1 + panel.remove(pa) + + elif item['title'] == 'HttpSend&Receivebytes': + panel = item['panels'] + for pa in reversed(panel): + pa['id'] = panel_id + panel_id += 1 + if pa['title'] == 'DataReceived&Sent': + n = panel.index(pa) + for ip in ip_list: + tmp = copy.deepcopy(pa) + tmp['targets'][0]["expr"] = "rate(minio_network_sent_bytes_total{instance=\"%s:9000\",job=\"minio_filelog_astana\"}[1m])"%ip + tmp['targets'][1]["expr"] = "rate(minio_network_received_bytes_total{instance=\"%s:9000\",job=\"minio_filelog_astana\"}[1m])"%ip + tmp['id'] = panel_id + panel_id += 1 + tmp['title'] = "%sDataReceived&Sent"%ip + panel.insert(n, tmp) + n += 1 + panel.remove(pa) + load_dict['panels'] = panels; + with open("./record.json","w") as f: + json.dump(load_dict,f) + print("OKKKKKKKKKKK") + +if __name__ == "__main__": + main()