应用场景
HBlock自带监控及告警功能,Web控制台及命令行控制台均可查询监控及告警信息。
同时,HBlock也支持将自身的监控数据推送至用户侧的Prometheus平台,方便用户统一对HBlock及用户侧的其他应用进行监控。
前提条件
用户侧已安装Prometheus监控平台,以及pushgateway组件。
HBlock集群可以访问pushgateway组件的访问地址。
具体操作
-
在HBlock中执行./stor config add -i monitor命令,开启监控数据推送至pushgateway的配置。监控数据的默认采集频率为20s。
命令格式:./stor config add -i monitor --pushgateway pushgatewayIp:pushgatewayPort --pushgateway-labels tag1:user-define-tag
示例1如下所示,含义:pushgateway访问地址为10.10.10.1:9091,监控数据不携带用户自定义标签
./stor config add -i monitor --pushgateway 10.10.10.1:9091
示例2如下所示,含义:pushgateway访问地址为10.10.10.1:9091,监控数据携带用户自定义标签idc:idc101
./stor config add -i monitor --pushgateway 10.10.10.1:9091 --pushgateway-labels idc:idc101
-
如果使用Prometheus+Grafana方案,可以通过Grafana面板查看HBlock推送监控数据。以下为Grafana建议面板配置。
{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "datasource", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 176, "iteration": 1718276013721, "links": [], "liveNow": false, "panels": [ { "collapsed": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 61, "panels": [], "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "refId": "A" } ], "title": "系统指标", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "s" }, "overrides": [] }, "gridPos": { "h": 4, "w": 3, "x": 0, "y": 1 }, "id": 54, "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "value" }, "pluginVersion": "8.4.4", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": false, "expr": "sum(time() - hblock_os_boot_time_seconds{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"})", "instant": true, "interval": "", "legendFormat": "", "refId": "A" } ], "title": "系统运行时间", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "一分钟内 CPU 所有内核的平均负载率", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [ { "options": { "NULL": { "index": 0, "text": "N/A" } }, "type": "value" } ], "max": 100, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 80 }, { "color": "red", "value": 90 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 4, "w": 4, "x": 3, "y": 1 }, "id": 18, "options": { "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showThresholdLabels": false, "showThresholdMarkers": true }, "pluginVersion": "8.4.4", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": false, "expr": "avg(hblock_load1{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}) / count(hblock_cpu_seconds_idle{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}) * 100", "interval": "", "legendFormat": "", "refId": "A" } ], "title": "CPU System Load (1m avg)", "type": "gauge" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "decimals": 2, "mappings": [ { "options": { "NULL": { "index": 0, "text": "N/A" } }, "type": "value" } ], "max": 100, "min": 0, "unit": "percent" }, "overrides": [ { "matcher": { "id": "byName", "options": "idle" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "usr" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 8, "w": 6, "x": 7, "y": 1 }, "id": 19, "options": { "displayLabels": [ "name" ], "legend": { "displayMode": "table", "placement": "right", "showLegend": true, "sortBy": "Value", "sortDesc": true, "values": [ "value" ] }, "pieType": "pie", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, "pluginVersion": "8.4.3", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": false, "expr": "avg(rate(hblock_cpu_seconds_user{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) by (serverIp) *100", "interval": "", "legendFormat": "usr", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": false, "expr": "avg(rate(hblock_cpu_seconds_iowait{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) by (serverIp) *100", "hide": false, "interval": "", "legendFormat": "iowait", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": false, "expr": "avg(rate(hblock_cpu_seconds_system{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) by (serverIp) *100", "hide": false, "interval": "", "legendFormat": "system", "refId": "C" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": false, "expr": "avg(rate(hblock_cpu_seconds_softirq{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) by (serverIp) *100", "hide": false, "interval": "", "legendFormat": "softirq", "refId": "D" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": false, "expr": "avg(rate(hblock_cpu_seconds_idle{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) by (serverIp) *100", "hide": false, "interval": "", "legendFormat": "idle", "refId": "E" } ], "title": "CPU ", "type": "piechart" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds", "seriesBy": "last" }, "custom": { "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "#EAB839", "value": 64 }, { "color": "red", "value": 128 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 8, "w": 11, "x": 13, "y": 1 }, "id": 100, "options": { "legend": { "calcs": [ "max", "mean", "lastNotNull" ], "displayMode": "table", "placement": "right", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "pluginVersion": "8.4.3", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_load1{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "instant": false, "interval": "", "legendFormat": "load1", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_load5{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "interval": "", "legendFormat": "load5", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_load15{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "interval": "", "legendFormat": "load15", "refId": "C" } ], "title": "load", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "计算5分钟内所有核的使用情况", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "decimals": 2, "mappings": [ { "options": { "NULL": { "index": 0, "text": "N/A" } }, "type": "value" } ], "max": 100, "thresholds": { "mode": "percentage", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 60 }, { "color": "orange", "value": 80 }, { "color": "red", "value": 90 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 4, "w": 3, "x": 0, "y": 5 }, "id": 14, "options": { "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showThresholdLabels": false, "showThresholdMarkers": true }, "pluginVersion": "8.4.4", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "100 - (avg(rate(hblock_cpu_seconds_idle{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) * 100)", "interval": "", "legendFormat": "", "refId": "A" } ], "title": "CPU使用率[5m]", "type": "gauge" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "max": 100, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 80 }, { "color": "red", "value": 90 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 4, "w": 4, "x": 3, "y": 5 }, "id": 52, "options": { "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showThresholdLabels": false, "showThresholdMarkers": true }, "pluginVersion": "8.4.4", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "100 - ((hblock_memory_MemAvailable_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"} * 100) / hblock_memory_MemTotal_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"})", "interval": "", "legendFormat": "", "refId": "A" } ], "title": "内存使用率", "type": "gauge" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic", "seriesBy": "last" }, "custom": { "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 2, "mappings": [], "max": 100, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 10, "w": 7, "x": 0, "y": 9 }, "id": 49, "options": { "legend": { "calcs": [ "max", "mean", "lastNotNull" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "pluginVersion": "8.4.3", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "(1 - avg(rate(hblock_cpu_seconds_idle{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) by (serverIp))*100", "interval": "", "legendFormat": "总使用率", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "avg(rate(hblock_cpu_seconds_user{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) by (serverIp) *100", "hide": false, "instant": false, "interval": "", "legendFormat": "cpu_user", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "avg(rate(hblock_cpu_seconds_iowait{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) by (serverIp) *100", "hide": false, "interval": "", "legendFormat": "cpu_iowait", "refId": "C" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "avg(rate(hblock_cpu_seconds_irq{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) by (serverIp) *100", "hide": false, "interval": "", "legendFormat": "cpu_irq", "refId": "D" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "avg(rate(hblock_cpu_seconds_system{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) by (serverIp) *100", "hide": false, "interval": "", "legendFormat": "cpu_system", "refId": "E" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "avg(rate(hblock_cpu_seconds_idle{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])) by (serverIp) *100", "hide": false, "interval": "", "legendFormat": "cpu_idle", "refId": "F" } ], "title": "CPU Basic ", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic", "seriesBy": "last" }, "custom": { "axisLabel": "", "axisPlacement": "auto", "axisSoftMin": 0, "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 10, "w": 9, "x": 7, "y": 9 }, "id": 50, "options": { "legend": { "calcs": [ "max", "mean", "lastNotNull" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "pluginVersion": "8.4.3", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_memory_MemTotal_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "instant": false, "interval": "", "legendFormat": "总内存", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_memory_MemTotal_bytes - hblock_memory_MemAvailable_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "instant": false, "interval": "", "legendFormat": "已使用", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_memory_Cached_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"} + hblock_memory_Buffers_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "instant": false, "interval": "", "legendFormat": "Cache+Buffer", "refId": "C" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_memory_MemAvailable_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "instant": false, "interval": "", "legendFormat": "可用", "refId": "D" } ], "title": "Memory Basic ", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "硬盘利用率:最近5min内硬盘处理IO时间占5min时长的百分比。虚拟盘除外", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 0, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 2, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 10, "w": 8, "x": 16, "y": 9 }, "id": 77, "options": { "legend": { "calcs": [ "max", "mean", "lastNotNull" ], "displayMode": "table", "placement": "bottom", "showLegend": true, "sortBy": "Max", "sortDesc": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": " (avg(rate(hblock_disk_io_time_seconds{idc=\"$idc\",clusterId=~\"$clusterId\",serverIp=~\"$serverIp\", job=\"hblock\"}[5m])) by (idc,clusterId,serverIp,device) * 100)", "interval": "", "legendFormat": "{{device}}", "refId": "A" } ], "title": "io utils%", "type": "timeseries" }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 19 }, "hiddenSeries": false, "id": 36, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": false, "rightSide": true, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "sum(rate(hblock_network_receive_bytes{idc=\"$idc\",clusterId=~\"$clusterId\",serverIp=~\"$serverIp\", job=\"hblock\",device=~'bond[01]'}[5m]))by (serverIp)", "hide": false, "instant": false, "interval": "", "legendFormat": "in_All", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "-sum(rate(hblock_network_transmit_bytes{idc=\"$idc\",clusterId=~\"$clusterId\",serverIp=~\"$serverIp\", job=\"hblock\",device=~'bond[01]'}[5m]))by (serverIp)", "hide": false, "interval": "", "legendFormat": "out_All", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_network_receive_bytes{idc=\"$idc\",clusterId=~\"$clusterId\",serverIp=~\"$serverIp\", job=\"hblock\"}[5m])", "hide": false, "interval": "", "legendFormat": "in_{{device}}", "refId": "D" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "-rate(hblock_network_transmit_bytes{idc=\"$idc\",clusterId=~\"$clusterId\",serverIp=~\"$serverIp\", job=\"hblock\"}[5m])", "hide": false, "interval": "", "legendFormat": "out_{{device}}", "refId": "C" } ], "thresholds": [], "timeRegions": [], "title": "网络流量", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:211", "format": "Bps", "label": "上传\\下载", "logBase": 1, "show": true }, { "$$hashKey": "object:212", "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "", "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 19 }, "hiddenSeries": false, "id": 47, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": false, "max": true, "min": false, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [ { "$$hashKey": "object:864", "alias": "/.*_in$/", "transform": "negative-Y" } ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "-irate(hblock_network_receive_errs{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"} [5m])", "hide": false, "interval": "", "legendFormat": "in_{{device}}", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "irate(hblock_network_transmit_errs{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"} [5m])", "interval": "", "legendFormat": "out_{{device}}", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "各个接口每秒 发送/接收 的错误数据包总数", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:834", "format": "short", "label": "接收\\发送", "logBase": 1, "show": true }, { "$$hashKey": "object:835", "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "collapsed": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 27 }, "id": 63, "panels": [], "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "refId": "A" } ], "title": "Netstatus TCP", "type": "row" }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "ActiveOpens - 已从 CLOSED 状态直接转换到 SYN-SENT 状态的 TCP 平均连接数(5分钟内) ;\n\nTCP_alloc - 已分配(已建立、已申请到sk_buff)的TCP套接字数量;\n\nPassiveOpens - 已从 LISTEN 状态直接转换到 SYN-RCVD 状态的 TCP 平均连接数(5分钟内)\n\nCurrEstab - 当前状态为 ESTABLISHED 或 CLOSE-WAIT 的 TCP 连接数;\n\nTCP_alloc - 已分配(已建立、已申请到sk_buff)的TCP套接字数量;\n\nTCP_inuse - 正在使用(正在侦听)的TCP套接字数量\n;\n\nTCP_orphan - 无主(不属于任何进程)的TCP连接数(无用、待销毁的TCP socket数);\n\nTCP_mem - TCP 套接字缓冲区使用;\n\nTCP_tw - 等待关闭的TCP连接数;\n\n", "fill": 1, "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 28 }, "hiddenSeries": false, "id": 38, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": false, "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "irate(hblock_netstat_tcp_ActiveOpens{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])", "hide": false, "interval": "", "legendFormat": "ActiveOpens", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_netstat_tcp_CurrEstab{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "interval": "", "legendFormat": "Estab|CloseWait", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_sockstat_tcp_alloc{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "interval": "", "legendFormat": "alloc", "refId": "D" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_sockstat_tcp_inuse{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "interval": "", "legendFormat": "inuse", "refId": "E" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_sockstat_tcp_orphan{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "interval": "", "legendFormat": "orphan", "refId": "F" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_sockstat_tcp_tw{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "interval": "", "legendFormat": "tw", "refId": "G" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "hblock_sockstat_tcp_mem{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}", "hide": false, "interval": "", "legendFormat": "mem", "refId": "H" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "irate(hblock_netstat_tcp_PassiveOpens{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])", "hide": false, "interval": "", "legendFormat": "PassiveOpens", "refId": "C" } ], "thresholds": [], "timeRegions": [], "title": "TCP 连接情况", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:1432", "format": "short", "label": "报文数", "logBase": 1, "show": true }, { "$$hashKey": "object:1433", "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "InErrs - TCP 接收的错误报文数(5分钟内);\nInSegs - TCP 接收的目前所有建立连接的错误报文数(5分钟内);\nOutRsts - TCP 发送的报文数(5分钟内)(包括 RST flag);\nOutSegs - TCP 发送的报文数(5分钟内)(包括当前连接的段但是不包括重传的段);", "fill": 1, "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 12, "y": 28 }, "hiddenSeries": false, "id": 57, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": false, "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [ { "$$hashKey": "object:299", "alias": "/.*Out|Re.*/", "transform": "negative-Y" } ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_netstat_tcp_InSegs{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])", "hide": false, "interval": "", "legendFormat": "InSegs", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_netstat_tcp_RetransSegs{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])", "interval": "", "legendFormat": "RetransSegs", "refId": "F" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_netstat_tcp_OutRsts{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])", "hide": false, "interval": "", "legendFormat": "OutRsts", "refId": "C" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_netstat_tcp_OutSegs{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])", "hide": false, "interval": "", "legendFormat": "OutSegs", "refId": "D" } ], "thresholds": [], "timeRegions": [], "title": "TCP 报文数", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:1684", "format": "short", "label": "发送/接收", "logBase": 1, "show": true }, { "$$hashKey": "object:1685", "decimals": 3, "format": "percent", "label": "重传率", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "", "fieldConfig": { "defaults": { "unit": "percent" }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 9, "w": 24, "x": 0, "y": 37 }, "hiddenSeries": false, "id": 64, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": false, "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_netstat_tcp_RetransSegs{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m])/rate(hblock_netstat_tcp_OutSegs{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"}[5m]) *100", "hide": false, "interval": "", "legendFormat": "重传率", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "重传率", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:1684", "format": "percent", "label": "重传率", "logBase": 1, "show": true }, { "$$hashKey": "object:1685", "decimals": 2, "format": "percent", "label": "重传率", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "collapsed": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 46 }, "id": 66, "panels": [], "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "refId": "A" } ], "title": "DiskStatus", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "auto", "displayMode": "auto" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byName", "options": "Value #A" }, "properties": [ { "id": "displayName", "value": "总量" }, { "id": "unit", "value": "bytes" }, { "id": "decimals", "value": 2 }, { "id": "custom.width", "value": 150 }, { "id": "custom.align", "value": "left" } ] }, { "matcher": { "id": "byName", "options": "Value #B" }, "properties": [ { "id": "displayName", "value": "剩余可用" }, { "id": "unit", "value": "bytes" }, { "id": "custom.width", "value": 150 }, { "id": "custom.align", "value": "left" }, { "id": "decimals", "value": 2 } ] }, { "matcher": { "id": "byName", "options": "Value #C" }, "properties": [ { "id": "unit", "value": "percent" }, { "id": "max", "value": 100 }, { "id": "custom.align", "value": "center" }, { "id": "color", "value": { "mode": "continuous-GrYlRd" } }, { "id": "displayName", "value": "使用率" }, { "id": "decimals", "value": 2 }, { "id": "custom.displayMode", "value": "lcd-gauge" } ] }, { "matcher": { "id": "byName", "options": "device" }, "properties": [ { "id": "custom.width", "value": 170 } ] }, { "matcher": { "id": "byName", "options": "fstype" }, "properties": [ { "id": "custom.width", "value": 124 } ] }, { "matcher": { "id": "byName", "options": "serverIp" }, "properties": [ { "id": "custom.width", "value": 259 } ] } ] }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 47 }, "id": 40, "options": { "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "frameIndex": 0, "showHeader": true, "sortBy": [ { "desc": true, "displayName": "使用率" } ] }, "pluginVersion": "8.4.4", "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": false, "expr": "hblock_fileSystem_size_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\",device=~\"/dev.*\"}-0", "format": "table", "hide": false, "instant": true, "interval": "", "legendFormat": "", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": false, "expr": "hblock_fileSystem_free_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\",device=~\"/dev.*\"}", "format": "table", "hide": false, "instant": true, "interval": "", "legendFormat": "", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": false, "expr": "(hblock_fileSystem_size_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\",device=~\"/dev.*\"}-hblock_fileSystem_free_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\",device=~\"/dev.*\"})*100/hblock_fileSystem_size_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\",device=~\"/dev.*\"}", "format": "table", "hide": false, "instant": true, "interval": "", "legendFormat": "", "refId": "C" } ], "title": "磁盘使用情况", "transformations": [ { "id": "merge", "options": {} }, { "id": "filterFieldsByName", "options": { "include": { "names": [ "device", "fstype", "mountpoint", "Value #A", "Value #B", "Value #C", "serverIp" ] } } } ], "type": "table" }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "磁盘分区每秒读/写的比特数", "fieldConfig": { "defaults": { "unit": "binBps" }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 55 }, "hiddenSeries": false, "id": 69, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": false, "rightSide": false, "show": true, "sort": "max", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [ { "$$hashKey": "object:206", "alias": "", "transform": "negative-Y" } ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_disk_read_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"} [5m])", "hide": false, "interval": "", "legendFormat": "{{device}} - Read bytes", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Disk Read Data", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:176", "format": "binBps", "label": "Read/Write", "logBase": 1, "show": true }, { "$$hashKey": "object:177", "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "磁盘分区每秒读/写的比特数", "fieldConfig": { "defaults": { "unit": "binBps" }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 55 }, "hiddenSeries": false, "id": 83, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": false, "rightSide": false, "show": true, "sort": "max", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [ { "$$hashKey": "object:206", "alias": "/.*Read.*/", "transform": "negative-Y" } ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_disk_written_bytes{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"} [5m])", "hide": false, "interval": "", "legendFormat": "{{device}} - Written bytes", "refId": "B" } ], "thresholds": [], "timeRegions": [], "title": "Disk Write Data", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:176", "format": "binBps", "label": "Read/Write", "logBase": 1, "show": true }, { "$$hashKey": "object:177", "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "磁盘分区输入/输出操作花费的毫秒数", "fieldConfig": { "defaults": { "unit": "ms" }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 63 }, "hiddenSeries": false, "id": 73, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": false, "rightSide": false, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_disk_io_time_seconds{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"} [5m])", "hide": false, "interval": "", "legendFormat": "{{device}} - IO time ms", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Milliseconds Spent Doing I/Os", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:176", "format": "ms", "label": "", "logBase": 1, "show": true }, { "$$hashKey": "object:177", "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "磁盘分区每秒读/写完成次数", "fieldConfig": { "defaults": { "unit": "iops" }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 63 }, "hiddenSeries": false, "id": 68, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": false, "rightSide": false, "show": true, "sort": "max", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [ { "$$hashKey": "object:206", "alias": "/.*Writes.*/", "transform": "negative-Y" } ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "-rate(hblock_disk_reads_completed{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\",device=~'sd[a-z]+'} [5m])", "hide": false, "interval": "", "legendFormat": "{{device}} - Reads completed", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_disk_writes_completed{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\",device=~'sd[a-z]+'} [5m])", "hide": false, "interval": "", "legendFormat": "{{device}} - Writes completed", "refId": "B" } ], "thresholds": [], "timeRegions": [], "title": "Disk IOps Completed", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:176", "format": "iops", "label": "Write/Read", "logBase": 1, "show": true }, { "$$hashKey": "object:177", "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "每个磁盘分区输入/输出操作花费的加权毫秒数", "fieldConfig": { "defaults": { "unit": "ms" }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 71 }, "hiddenSeries": false, "id": 71, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": false, "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_disk_io_time_weighted_seconds{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"} [5m])", "hide": false, "interval": "", "legendFormat": "{{device}} - IO time weighted", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Disk IOs Weighted", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:176", "format": "ms", "label": "", "logBase": 1, "show": true }, { "$$hashKey": "object:177", "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "磁盘分区读/写花费的毫秒数", "fieldConfig": { "defaults": { "unit": "ms" }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 71 }, "hiddenSeries": false, "id": 70, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": false, "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [ { "$$hashKey": "object:206", "alias": "/.*Read.*/", "transform": "negative-Y" } ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "-rate(hblock_disk_read_time_seconds{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"} [5m])", "hide": false, "interval": "", "legendFormat": "{{device}} - Read time ms", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "rate(hblock_disk_write_time_seconds_total{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\",device=~'sd[a-z]+'} [5m])", "hide": false, "interval": "", "legendFormat": "{{device}} - Write time ms", "refId": "B" } ], "thresholds": [], "timeRegions": [], "title": "Disk R/W Time", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:176", "format": "ms", "label": "Read/Write", "logBase": 1, "show": true }, { "$$hashKey": "object:177", "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "${DS}" }, "description": "磁盘分区每秒正在处理的输入/输出请求数", "fieldConfig": { "defaults": { "unit": "iops" }, "overrides": [] }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 9, "w": 24, "x": 0, "y": 79 }, "hiddenSeries": false, "id": 74, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": false, "rightSide": true, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "8.4.4", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS}" }, "exemplar": true, "expr": "irate(hblock_disk_io_now{idc=\"$idc\",clusterId=\"$clusterId\",serverIp=\"$serverIp\", job=\"hblock\"} [5m])", "hide": false, "interval": "", "legendFormat": "{{device}} - IO now", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Disk IOs Current in Progress", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "$$hashKey": "object:176", "format": "iops", "label": "", "logBase": 1, "show": true }, { "$$hashKey": "object:177", "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "refresh": "", "revision": 1, "schemaVersion": 35, "style": "dark", "tags": [], "templating": { "list": [ { "current": { "selected": false, "text": "", "value": "" }, "hide": 0, "includeAll": false, "label": "数据源", "multi": false, "name": "DS", "options": [], "query": "prometheus", "queryValue": "", "refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "current": { "selected": true, "text": "neimengaz03", "value": "neimengaz03" }, "datasource": { "type": "prometheus", "uid": "${DS}" }, "definition": "label_values(idc)", "description": "数据源内可选的资源池名称", "error": { "config": { "headers": { "X-Grafana-Org-Id": 1 }, "hideFromInspector": true, "method": "GET", "retry": 0, "url": "api/datasources/proxy/9/api/v1/label/idc/values?start=1718274193&end=1718275993" }, "data": { "error": "Bad Gateway", "message": "Bad Gateway", "response": "" }, "message": "Bad Gateway", "status": 502, "statusText": "Bad Gateway" }, "hide": 0, "includeAll": false, "label": "资源池", "multi": false, "name": "idc", "options": [], "query": { "query": "label_values(idc)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" }, { "current": { "selected": false, "text": "testZJZClusterId", "value": "testZJZClusterId" }, "datasource": { "type": "prometheus", "uid": "${DS}" }, "definition": "label_values(hblock_cpu_seconds_user{idc=~\"$idc\"},clusterId)", "error": { "config": { "data": { "end": "1718276000", "match[]": "hblock_cpu_seconds_user{idc=~\"neimengaz03\"}", "start": "1718274200" }, "headers": { "Content-Type": "application/x-www-form-urlencoded", "X-Grafana-Org-Id": 1 }, "hideFromInspector": true, "method": "POST", "retry": 0, "url": "api/datasources/proxy/9/api/v1/series" }, "data": { "error": "Bad Gateway", "message": "Bad Gateway", "response": "" }, "message": "Bad Gateway", "status": 502, "statusText": "Bad Gateway" }, "hide": 0, "includeAll": false, "label": "集群ID", "multi": false, "name": "clusterId", "options": [], "query": { "query": "label_values(hblock_cpu_seconds_user{idc=~\"$idc\"},clusterId)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" }, { "current": { "selected": false, "text": "10.8.82.10", "value": "10.8.82.10" }, "datasource": { "type": "prometheus", "uid": "${DS}" }, "definition": "label_values(hblock_cpu_seconds_user{idc=~\"$idc\",clusterId=~\"$clusterId\"},serverIp)", "description": "", "error": { "config": { "data": { "end": "1718276007", "match[]": "hblock_cpu_seconds_user{idc=~\"neimengaz03\",clusterId=~\"testZJZClusterId\"}", "start": "1718274207" }, "headers": { "Content-Type": "application/x-www-form-urlencoded", "X-Grafana-Org-Id": 1 }, "hideFromInspector": true, "method": "POST", "retry": 0, "url": "api/datasources/proxy/9/api/v1/series" }, "data": { "error": "Bad Gateway", "message": "Bad Gateway", "response": "" }, "message": "Bad Gateway", "status": 502, "statusText": "Bad Gateway" }, "hide": 0, "includeAll": false, "label": "服务器IP", "multi": false, "name": "serverIp", "options": [], "query": { "query": "label_values(hblock_cpu_seconds_user{idc=~\"$idc\",clusterId=~\"$clusterId\"},serverIp)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" } ] }, "time": { "from": "now-30m", "to": "now" }, "timepicker": {}, "timezone": "", "title": "hblock集群-单服务器视图", "uid": "mxeQ7uC4z4", "version": 1, "weekStart": "monday" }
-
将第2步中提供的Grafana面板导入Grafana中,查看HBlock推送的监控数据。下图为,携带用户自定义标签idc:idc101的监控数据的展示效果。