Code Monkey home page Code Monkey logo

Comments (8)

w7sgyf avatar w7sgyf commented on August 24, 2024

1、grafana 版本信息:v9.3.6
2、问题:
导入交换机端口监控的Json文档,端口图表无法扩展
1)grafana中,可以根据设备的interfaces变量,自动水平和竖直扩展
grafana:
![2222](https://

2)导入夜莺6.0.0-ga.10版本后
111

333

3、grafana

大盘 json { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "datasource", "uid": "grafana" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "limit": 100, "name": "Annotations & Alerts", "showIn": 0, "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "description": "Bandwidth in and out of each interface of a SNMP device.流量单位bit/sec", "editable": true, "fiscalYearStartMonth": 0, "gnetId": 10523, "graphTooltip": 0, "id": 110, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "prometheus", "uid": "lGOdD8LGz" }, "description": "\n10.17.30.1 4507R\n10.17.30.30 维护厂\n10.17.30.220 存储交换机\n10.17.30.29 POY1F\n10.17.30.74 发货中心", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "decimals": 1, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "dtdurations" }, "overrides": [] }, "gridPos": { "h": 3, "w": 24, "x": 0, "y": 0 }, "id": 70, "links": [], "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "9.3.6", "repeatDirection": "h", "targets": [ { "datasource": { "type": "prometheus", "uid": "lGOdD8LGz" }, "exemplar": false, "expr": "sysUpTime{instance=\"$Device\",job=\"$Job\"}/100", "format": "time_series", "instant": true, "interval": "", "intervalFactor": 1, "legendFormat": "", "refId": "A" } ], "title": "运行时长", "transparent": true, "type": "stat" }, { "aliasColors": { "Out": "#C15C17" }, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "lGOdD8LGz" }, "editable": true, "error": false, "fill": 1, "fillGradient": 1, "gridPos": { "h": 7, "w": 6, "x": 0, "y": 3 }, "hiddenSeries": false, "id": 1, "legend": { "alignAsTable": false, "avg": false, "current": true, "max": true, "min": false, "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.3.6", "pointradius": 5, "points": false, "renderer": "flot", "repeat": "Interface", "seriesOverrides": [ { "$$hashKey": "object:215", "alias": "Out", "transform": "negative-Y" } ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "lGOdD8LGz" }, "expr": "irate(ifHCInOctets{job='$Job',instance='$Device',ifName='$Interface'}[5m]) * 8", "intervalFactor": 2, "legendFormat": "In", "refId": "A", "step": 60 }, { "datasource": { "type": "prometheus", "uid": "lGOdD8LGz" }, "expr": "irate(ifHCOutOctets{job='$Job',instance='$Device',ifName='$Interface'}[5m]) * 8", "intervalFactor": 2, "legendFormat": "Out", "refId": "B", "step": 60 } ], "thresholds": [], "timeRegions": [], "title": "$Interface", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "bps", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "refresh": "5s", "schemaVersion": 37, "style": "dark", "tags": [ "$Job", "交换机" ], "templating": { "list": [ { "current": { "selected": false, "text": "snmp", "value": "snmp" }, "datasource": { "type": "prometheus", "uid": "lGOdD8LGz" }, "definition": "", "hide": 0, "includeAll": false, "multi": false, "name": "Job", "options": [], "query": { "query": "label_values(ifHCInOctets, job)", "refId": "Prometheus-24.92-Job-Variable-Query" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query", "useTags": false }, { "current": { "selected": false, "text": "10.17.30.1", "value": "10.17.30.1" }, "datasource": { "type": "prometheus", "uid": "lGOdD8LGz" }, "definition": "", "hide": 0, "includeAll": false, "multi": false, "name": "Device", "options": [], "query": { "query": "query_result(sum by (instance)(ifHCInOctets{job=\"$Job\"}))", "refId": "Prometheus-24.92-Device-Variable-Query" }, "refresh": 1, "regex": ".*instance=\"(.*?)\".*", "skipUrlSync": false, "sort": 1, "type": "query", "useTags": false }, { "current": { "selected": false, "text": "All", "value": "$__all" }, "datasource": { "type": "prometheus", "uid": "lGOdD8LGz" }, "definition": "query_result(ifOperStatus{instance=\"$Device\"} == 1)", "hide": 0, "includeAll": true, "multi": false, "name": "Interface", "options": [], "query": { "query": "query_result(ifOperStatus{instance=\"$Device\"} == 1)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": ".*ifName=\"(.*?)\",.*", "skipUrlSync": false, "sort": 5, "type": "query", "useTags": false } ] }, "time": { "from": "now-15m", "to": "now" }, "timepicker": { "nowDelay": "", "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": "交换机端口详细信息", "uid": "design-by-ljy", "version": 25, "weekStart": "" }

from fe.

w7sgyf avatar w7sgyf commented on August 24, 2024

grafana 大盘 json:
交换机端口详细信息-1687751286133.zip

需要描述下具体问题 @jsers

from fe.

liufangpeng avatar liufangpeng commented on August 24, 2024
Click to expand ``` { "name": "容器监控", "tags": "prod", "ident": "", "configs": { "var": [ { "name": "datasource", "type": "datasource", "definition": "prometheus", "defaultValue": 2 }, { "name": "namespace", "type": "query", "datasource": { "cate": "prometheus", "value": "${datasource}" }, "definition": "label_values(container_cpu_usage_seconds_total, namespace)", "reg": "/^plm.*prod|lms.*.prod/" }, { "name": "pod_name", "definition": "label_values(container_cpu_usage_seconds_total{namespace=~\"$namespace\"}, pod)", "multi": false, "reg": "", "type": "query", "datasource": { "cate": "prometheus", "value": "${datasource}" } } ], "version": "3.0.0", "panels": [ { "type": "row", "id": "efcdef8c-86f8-453c-8c1d-fb7e55637cc6", "name": "namespace概览", "collapsed": true, "layout": { "h": 1, "w": 24, "x": 0, "y": 0, "i": "efcdef8c-86f8-453c-8c1d-fb7e55637cc6", "isResizable": false }, "panels": [] }, { "type": "barGauge", "id": "8ddadb65-1140-4500-b22b-673f4769e854", "layout": { "h": 4, "w": 12, "x": 0, "y": 1, "i": "8ddadb65-1140-4500-b22b-673f4769e854", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "container_memory_working_set_bytes{image!=\"\",pod!=\"\",namespace=\"$namespace\"}/1024/1024/1024", "legend": "{{pod}}" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器内存使用量", "links": [], "maxPerRow": 4, "custom": { "calc": "lastNotNull", "baseColor": "#FF656B", "serieWidth": 35, "sortOrder": "desc" }, "options": { "valueMappings": [ { "type": "range", "result": { "color": "#61d071" }, "match": { "from": 0, "to": 5 } } ], "standardOptions": {} } }, { "type": "barGauge", "id": "45607cbf-04c5-4e35-b091-459ccd56327b", "layout": { "h": 4, "w": 12, "x": 12, "y": 1, "i": "45607cbf-04c5-4e35-b091-459ccd56327b", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(rate(container_cpu_usage_seconds_total{pod!=\"\", image!~\".*pause.*\",namespace=\"$namespace\"}[1m])*100) by(pod) > 1" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器CPU使用率>1%", "maxPerRow": 4, "custom": { "calc": "lastNotNull", "baseColor": "#FF656B", "serieWidth": 35, "sortOrder": "desc" }, "options": { "valueMappings": [ { "type": "range", "result": { "color": "#61d071" }, "match": { "from": 0, "to": 80 } } ], "standardOptions": {} } }, { "id": "79d7e3b0-b64f-4591-b5dd-994ce16b68ca", "type": "row", "name": "整体概况", "layout": { "h": 1, "w": 24, "x": 0, "y": 5, "i": "79d7e3b0-b64f-4591-b5dd-994ce16b68ca", "isResizable": false }, "collapsed": true, "panels": [] }, { "targets": [ { "refId": "A", "expr": "sum(rate(container_cpu_usage_seconds_total{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}[1m])*100) by(name)", "legend": "" } ], "name": "容器CPU使用率", "description": "容器1min CPU平均使用率,如果pod内有多个容器,会分别显示各个容器CPU使用率(pause容器默认不会显示);如果容器配置了4核,使用率400%表示当前用满4核,容器配置2核,使用率200%表示当前用满2核。", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent", "min": 0, "max": null }, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 0, "y": 6, "i": "860c1484-1f83-497e-a061-a50fbb3ff1dc", "isResizable": true }, "id": "860c1484-1f83-497e-a061-a50fbb3ff1dc", "datasourceCate": "prometheus", "datasourceValue": "${datasource}" }, { "targets": [ { "refId": "A", "expr": "((sum(container_memory_usage_bytes{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}) by (name)) /(sum(container_spec_memory_limit_bytes{pod=\"$pod_name\", image!~\".*pause.*\"}) by (name)))*100" } ], "name": "容器内存使用率", "description": "(container_memory_rss + container_memory_cache + container_memory_swap + kernel memory)/ (memory limit), 没有数据表明容器配置没有设置mem limit", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent", "max": null }, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 6, "y": 6, "i": "e7b80412-d9b2-4589-8175-abf93a62a524", "isResizable": true }, "id": "e7b80412-d9b2-4589-8175-abf93a62a524", "datasourceCate": "prometheus", "datasourceValue": "${datasource}" }, { "targets": [ { "refId": "A", "expr": "sum(rate(container_network_receive_bytes_total{pod=\"$pod_name\", name!=\"\"}[1m])) by(name, interface)" } ], "name": "网络接收速率", "description": "容器网络接收的字节数(1 分钟内)", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC" }, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "fillOpacity": 0.5, "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 12, "y": 6, "i": "8f98a264-7058-4fa0-8efc-3c87954a0370", "isResizable": true }, "id": "8f98a264-7058-4fa0-8efc-3c87954a0370", "datasourceCate": "prometheus", "datasourceValue": "${datasource}" }, { "targets": [ { "refId": "A", "expr": "sum(rate(container_network_transmit_bytes_total{pod=\"$pod_name\", name!=\"\"}[1m])) by(name, interface)" } ], "name": "网络发送速率", "description": "容器网络发送的字节数(1 分钟内)", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC" }, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "fillOpacity": 0.5, "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 18, "y": 6, "i": "f9b140e8-0b44-4b32-9d54-9360b06faa48", "isResizable": true }, "id": "f9b140e8-0b44-4b32-9d54-9360b06faa48", "datasourceCate": "prometheus", "datasourceValue": "${datasource}" }, { "targets": [ { "refId": "A", "expr": "sum((time()-container_start_time_seconds{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"})) by (name)" } ], "name": "容器启动时长(小时)", "custom": { "textMode": "valueAndName", "colorMode": "value", "calc": "lastNotNull", "colSpan": 1, "textSize": {} }, "options": { "standardOptions": { "util": "humantimeSeconds" } }, "version": "2.0.0", "type": "stat", "layout": { "h": 7, "w": 6, "x": 0, "y": 13, "i": "1868973e-c3d3-4fd4-83b0-36ec2e06dfe0", "isResizable": true }, "id": "1868973e-c3d3-4fd4-83b0-36ec2e06dfe0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}" }, { "targets": [ { "refId": "A", "expr": "(sum(container_memory_usage_bytes{pod=\"$pod_name\", name!=\"\" , image!~\".*pause.*\"}) by (name)) " } ], "name": "容器内存使用", "description": "container_memory_rss + container_memory_cache + container_memory_swap + kernel memory", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC", "max": null }, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "fillOpacity": 0.5, "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 6, "y": 13, "i": "c72fddc9-2856-4f68-9b3d-d2959d2cd1b6", "isResizable": true }, "id": "7e7ed3d9-01b5-4fcb-be8b-5ae10197ec2d", "datasourceCate": "prometheus", "datasourceValue": "${datasource}" }, { "targets": [ { "refId": "A", "expr": "sum(rate(container_fs_reads_bytes_total{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}[1m])) by(name)", "legend": "" } ], "name": "文件系统读取速率", "description": "", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC", "min": 0, "max": null }, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "fillOpacity": 0.5, "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 12, "y": 13, "i": "f385736d-fd05-4705-a27d-41e67fb6c843", "isResizable": true }, "id": "f385736d-fd05-4705-a27d-41e67fb6c843", "datasourceCate": "prometheus", "datasourceValue": "${datasource}" }, { "targets": [ { "refId": "A", "expr": "sum(rate(container_fs_writes_bytes_total{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}[1m])) by(name)", "legend": "" } ], "name": "文件系统写入速率", "description": "", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC", "min": 0, "max": null }, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "fillOpacity": 0.5, "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 18, "y": 13, "i": "978e93a0-770e-42f5-a374-cafb5b4fc585", "isResizable": true }, "id": "978e93a0-770e-42f5-a374-cafb5b4fc585", "datasourceCate": "prometheus", "datasourceValue": "${datasource}" }, { "id": "8a4942a2-81a3-4473-81be-79b3541e09a3", "type": "row", "name": "CPU", "layout": { "h": 1, "w": 24, "x": 0, "y": 20, "i": "8a4942a2-81a3-4473-81be-79b3541e09a3", "isResizable": false }, "collapsed": true, "panels": [] }, { "type": "timeseries", "id": "b302c1a0-a499-4a99-aff2-d460685846ab", "layout": { "h": 7, "w": 6, "x": 0, "y": 21, "i": "b302c1a0-a499-4a99-aff2-d460685846ab", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(rate(container_cpu_cfs_throttled_periods_total{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}[1m]))by(name) *100" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器发生CPU throttle的比率", "description": "该值大于0,说明CPU在运行期间发生throttle情况,即容器设置的CPU规格,不满足容器当前对CPU的实际需求,在这种情况下,往往需要调大容器CPU规格,或者优化程序,降低CPU开销。", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "715c1e5a-c504-4f2c-a790-dad1c73aae29", "layout": { "h": 7, "w": 6, "x": 6, "y": 21, "i": "715c1e5a-c504-4f2c-a790-dad1c73aae29", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(rate(container_cpu_usage_seconds_total{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}[1m])*100) by(name)/((sum(container_spec_cpu_quota{pod=\"$pod_name\"}/container_spec_cpu_period{pod=\"$pod_name\"}) by (name)))" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器CPU归一化后使用率", "description": "容器1min CPU平均使用率,如果pod内有多个容器,会分别显示各个容器CPU使用率(pause容器默认不会显示);如果容器配置了4核,使用率100%表示当前用满4核,容器配置2核,使用率100%表示当前用满2核,如果容器没有配置cpu limit,则不会显示该数值", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent", "max": null }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "d23a509d-3bb0-4680-b579-b89a411830a4", "layout": { "h": 7, "w": 6, "x": 12, "y": 21, "i": "d23a509d-3bb0-4680-b579-b89a411830a4", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(rate(container_cpu_system_seconds_total{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}[1m])*100) by(name)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器内核态CPU使用率", "description": "容器1min 内核态CPU平均使用率,如果pod内有多个容器,会分别显示各个容器内核态CPU使用率(pause容器默认不会显示);如果容器配置了4核,使用率400%表示当前内核态用满4核,容器配置2核,使用率200%表示当前内核态用满2核。", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent", "max": null }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "2921e6d0-1b9c-449d-9dd8-fb29dce8ca7d", "layout": { "h": 7, "w": 6, "x": 18, "y": 21, "i": "2921e6d0-1b9c-449d-9dd8-fb29dce8ca7d", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(rate(container_cpu_user_seconds_total{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}[1m])*100) by(name)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器用户态CPU使用率", "description": "容器1min 内核态CPU平均使用率,如果pod内有多个容器,会分别显示各个容器用户态CPU使用率(pause容器默认不会显示);如果容器配置了4核,使用率400%表示当前用户态用满4核,容器配置2核,使用率200%表示当前用户态用满2核。", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "percent", "max": null }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "7152f66a-d907-4ee9-afd3-a04b12f1019b", "layout": { "h": 7, "w": 6, "x": 0, "y": 28, "i": "7152f66a-d907-4ee9-afd3-a04b12f1019b", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(container_tasks_state{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\", state=\"running\"}) by (name)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "running task 数量", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "stat", "id": "cd5e8b99-8a76-4dea-b8b2-3bff825a7f8d", "layout": { "h": 7, "w": 6, "x": 6, "y": 28, "i": "cd5e8b99-8a76-4dea-b8b2-3bff825a7f8d", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "(sum(container_spec_cpu_quota{pod=\"$pod_name\", name!=\"\",image!= \"\"}/container_spec_cpu_period{pod=\"$pod_name\"}) by (name))" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器CPU Limit", "description": "容器CPU Limit,2代表容器CPU Limit为2核, 0.2代表容器CPU Limit为0.2核, 没有数据表明没有设置Limit值", "maxPerRow": 4, "custom": { "textMode": "valueAndName", "graphMode": "none", "colorMode": "value", "calc": "lastNotNull", "valueField": "Value", "colSpan": 1, "textSize": {} }, "options": { "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } } }, { "type": "timeseries", "id": "408c29b9-2a49-49a2-a98b-3ad7da9c57bd", "layout": { "h": 7, "w": 6, "x": 12, "y": 28, "i": "408c29b9-2a49-49a2-a98b-3ad7da9c57bd", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(container_cpu_load_average_10s{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}) by (name)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器CPU load 10", "description": "过去10s的CPU负载", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "max": null }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "fe62f7db-4f87-4da1-bfc3-60ed5039e31e", "layout": { "h": 7, "w": 6, "x": 18, "y": 28, "i": "fe62f7db-4f87-4da1-bfc3-60ed5039e31e", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(container_tasks_state{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\", state=\"uninterruptible\"}) by (name)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "uninterruptible task 数量", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "4d5f9cbb-3b78-4fe6-8a4e-59ca52a49666", "layout": { "h": 7, "w": 6, "x": 0, "y": 35, "i": "4d5f9cbb-3b78-4fe6-8a4e-59ca52a49666", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "(sum(container_memory_usage_bytes{pod=\"$pod_name\", name!=\"\" , image!~\".*pause.*\"}) by (name)) " } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器内存使用", "description": "container_memory_rss + container_memory_cache + container_memory_swap + kernel memory", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC", "max": null }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "d2627af4-5753-4384-880b-84bead73002a", "layout": { "h": 7, "w": 6, "x": 6, "y": 35, "i": "d2627af4-5753-4384-880b-84bead73002a", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(container_tasks_state{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\", state=\"iowaiting\"}) by (name)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "ioawaiting task 数量", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "78801242-2aae-48dc-a3c3-3d0050fac92c", "layout": { "h": 7, "w": 6, "x": 12, "y": 35, "i": "78801242-2aae-48dc-a3c3-3d0050fac92c", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(container_tasks_state{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\", state=\"sleeping\"}) by (name)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "sleeping task 数量", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "723a4b98-52e8-4284-b193-98a470189415", "layout": { "h": 7, "w": 6, "x": 18, "y": 35, "i": "723a4b98-52e8-4284-b193-98a470189415", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(container_tasks_state{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\", state=\"stopped\"}) by (name)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "stopped task 数量", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "id": "39a8bcef-7b91-4ec4-8644-4e5674267437", "type": "row", "name": "内存", "layout": { "h": 1, "w": 24, "x": 0, "y": 42, "i": "39a8bcef-7b91-4ec4-8644-4e5674267437", "isResizable": false }, "collapsed": true, "panels": [] }, { "type": "timeseries", "id": "13173c71-14a9-43a0-9cbe-34c1bb453f2b", "layout": { "h": 7, "w": 6, "x": 0, "y": 43, "i": "13173c71-14a9-43a0-9cbe-34c1bb453f2b", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(container_spec_memory_limit_bytes{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}) by (name)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器内存 Limit", "description": "容器内存Limit配置,0表示没有设置内存 Limit", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "4c2e1b54-1adb-480e-a581-1763bec5113f", "layout": { "h": 7, "w": 6, "x": 6, "y": 43, "i": "4c2e1b54-1adb-480e-a581-1763bec5113f", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "(sum(container_memory_usage_bytes{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}) by (name)) " } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器内存使用", "description": "container_memory_rss + container_memory_cache + container_memory_swap + kernel memory", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "429e0214-7b71-4fc0-a771-945363948999", "layout": { "h": 7, "w": 6, "x": 12, "y": 43, "i": "429e0214-7b71-4fc0-a771-945363948999", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "(sum(container_memory_cache{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}) by (name))" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器cache使用", "description": "容器cache 占用大小", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "27c1a22c-bdf3-4a8d-bd31-16c66a307f3f", "layout": { "h": 7, "w": 6, "x": 18, "y": 43, "i": "27c1a22c-bdf3-4a8d-bd31-16c66a307f3f", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "(sum(container_memory_rss{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}) by (name))" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器RSS内存使用", "description": "容器RSS内存占用大小。", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "ef7e1b00-2a77-4a34-a138-5c8207088476", "layout": { "h": 7, "w": 6, "x": 0, "y": 50, "i": "ef7e1b00-2a77-4a34-a138-5c8207088476", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(rate(container_fs_reads_bytes_total{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}[1m])) by(name)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "文件系统读取速率", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "stat", "id": "d3a7153b-f174-473c-a5ae-1ec8ff4ef318", "layout": { "h": 7, "w": 6, "x": 6, "y": 50, "i": "d3a7153b-f174-473c-a5ae-1ec8ff4ef318", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(container_oom_events_total{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}) by (name) " } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器发生OOM次数", "maxPerRow": 4, "custom": { "textMode": "valueAndName", "graphMode": "none", "colorMode": "value", "calc": "lastNotNull", "valueField": "Value", "colSpan": 1, "textSize": {} }, "options": { "valueMappings": [], "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } } }, { "type": "timeseries", "id": "271d8ff6-2382-488d-b479-83e38b247012", "layout": { "h": 7, "w": 6, "x": 12, "y": 50, "i": "271d8ff6-2382-488d-b479-83e38b247012", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(rate(container_network_receive_errors_total{pod=\"$pod_name\", name!=\"\"}[1m])) by(name, interface)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "网络接收错误数", "description": "网络接收错误数(1分钟内)", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "e7a0879b-82a9-4518-8c5c-93bc73548401", "layout": { "h": 7, "w": 6, "x": 18, "y": 50, "i": "e7a0879b-82a9-4518-8c5c-93bc73548401", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(rate(container_network_receive_packets_dropped_total{pod=\"$pod_name\", name!=\"\"}[1m])) by(name, interface)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "网络接收丢包数", "description": "网络接收丢包数(1分钟内)", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "2b4e94ef-c994-4910-b72b-428bf5156a21", "layout": { "h": 7, "w": 6, "x": 0, "y": 57, "i": "2b4e94ef-c994-4910-b72b-428bf5156a21", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(container_fs_inodes_total{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}) by (name) " } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "inode数量", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "e55b7db3-2b13-43f9-aa2d-e9a0a929df4b", "layout": { "h": 7, "w": 6, "x": 6, "y": 57, "i": "e55b7db3-2b13-43f9-aa2d-e9a0a929df4b", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(rate(container_fs_writes_bytes_total{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}[1m])) by(name)" } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "文件系统写入速率", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "type": "timeseries", "id": "3abade99-8f34-4a1e-bb48-c5ba1e128749", "layout": { "h": 7, "w": 6, "x": 12, "y": 57, "i": "3abade99-8f34-4a1e-bb48-c5ba1e128749", "isResizable": true }, "version": "3.0.0", "datasourceCate": "prometheus", "datasourceValue": "${datasource}", "targets": [ { "refId": "A", "expr": "sum(container_fs_usage_bytes{pod=\"$pod_name\", name!=\"\", image!~\".*pause.*\"}) by (name) " } ], "transformations": [ { "id": "organize", "options": {} } ], "name": "容器已使用的文件系统大小", "maxPerRow": 4, "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC" }, "thresholds": { "steps": [ { "color": "#634CD9", "value": null, "type": "base" } ] } }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "spanNulls": false, "lineWidth": 1, "fillOpacity": 0.5, "gradientMode": "none", "stack": "off", "scaleDistribution": { "type": "linear" } } }, { "id": "8d49afd3-d8fa-4714-aaa2-b10e045c8976", "type": "row", "name": "磁盘", "layout": { "h": 1, "w": 24, "x": 0, "y": 64, "i": "8d49afd3-d8fa-4714-aaa2-b10e045c8976", "isResizable": false }, "collapsed": true }, { "id": "fde213bc-fe49-431a-9495-2219fcaaa01a", "type": "row", "name": "网络", "layout": { "h": 1, "w": 24, "x": 0, "y": 65, "i": "fde213bc-fe49-431a-9495-2219fcaaa01a", "isResizable": false }, "collapsed": false, "panels": [ { "targets": [ { "refId": "A", "expr": "sum(rate(container_network_transmit_bytes_total{pod=\"$pod_name\", name!=\"\"}[1m])) by(name, interface)" } ], "name": "网络发送速率", "description": "容器网络发送的字节数(1 分钟内)", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC" }, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "fillOpacity": 0.5, "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 0, "y": 66, "i": "4e70bc47-1510-41fe-a924-3ffa36d11f0f", "isResizable": true }, "id": "4e70bc47-1510-41fe-a924-3ffa36d11f0f" }, { "targets": [ { "refId": "A", "expr": "sum(rate(container_network_transmit_packets_total{pod=\"$pod_name\", name!=\"\"}[1m])) by(name, interface)" } ], "name": "网络发送数据包", "description": "网络发送数据包数(1分钟内)", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "fillOpacity": 0.5, "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 6, "y": 66, "i": "00ca29e5-7c97-491d-a28f-0f2d66ea47c5", "isResizable": true }, "id": "00ca29e5-7c97-491d-a28f-0f2d66ea47c5" }, { "targets": [ { "refId": "A", "expr": "sum(rate(container_network_transmit_errors_total{pod=\"$pod_name\", name!=\"\"}[1m])) by(name, interface)" } ], "name": "网络发送错误数", "description": "网络发送错误数(1分钟内)", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "fillOpacity": 0.5, "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 12, "y": 66, "i": "8cd76b5f-5bba-421a-9fda-42f406f54ed5", "isResizable": true }, "id": "8cd76b5f-5bba-421a-9fda-42f406f54ed5" }, { "targets": [ { "refId": "A", "expr": "sum(rate(container_network_transmit_packets_dropped_total{pod=\"$pod_name\", name!=\"\"}[1m])) by(name, interface)" } ], "name": "网络发送丢包数", "description": "网络发送丢包数(1分钟内)", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": {}, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "fillOpacity": 0.5, "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 18, "y": 66, "i": "58aaebbb-b1cf-4089-bcb5-70b03c05318d", "isResizable": true }, "id": "58aaebbb-b1cf-4089-bcb5-70b03c05318d" }, { "targets": [ { "refId": "A", "expr": "sum(rate(container_network_receive_bytes_total{pod=\"$pod_name\", name!=\"\"}[1m])) by(name, interface)" } ], "name": "网络接收速率", "description": "容器网络接收的字节数(1 分钟内)", "options": { "tooltip": { "mode": "all", "sort": "none" }, "legend": { "displayMode": "hidden" }, "standardOptions": { "util": "bytesIEC" }, "thresholds": {} }, "custom": { "drawStyle": "lines", "lineInterpolation": "smooth", "fillOpacity": 0.5, "stack": "off" }, "version": "2.0.0", "type": "timeseries", "layout": { "h": 7, "w": 6, "x": 0, "y": 73, "i": "120d3540-cce5-4b08-b596-0ec6a5b2d497", "isResizable": true }, "id": "120d3540-cce5-4b08-b596-0ec6a5b2d497" } ] } ] } } ```

需要描述下具体问题 @jsers

from fe.

lddlww avatar lddlww commented on August 24, 2024

grafana 版本信息:v9.3.2
几个问题:
1、其它Query类型变量对Datasource类型的变量有依赖,如果Datasource变量是在最后一行,会导致其它Query类型变量没有值;目前解决办法是把Datasource类型变量移到第一行
2、对于grafana中隐藏变量,导入到夜莺中不会隐藏;目前解决办法:要手动点击隐藏变量
3、对于grafana中有设置单位的panel,导入到夜莺中会导致单位丢失;目前解决办法:手动设置单位

from fe.

jsers avatar jsers commented on August 24, 2024

@lddlww
导入功能无法做到完全覆盖,现阶段只是降低迁移到夜莺的成本
1、2 问题后面版本解决下
3 grafana 和 n9e 对单位的设计有所区别,目前只能导入后手动调整

from fe.

net2817 avatar net2817 commented on August 24, 2024

rancher garana 9.1.5导入夜莺6.2.0版本,全部有问题。
6bf312f21cfbf1e21572d95e57b0018
导入后变成:
64f18e828943945ff2e3dcbaec53380

导入代码 { "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": 22, "links": [], "liveNow": false, "panels": [ { "aliasColors": { "{{pod}}": "#3797d5" }, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "uid": "$datasource" }, "fill": 0, "fillGradient": 0, "gridPos": { "h": 7, "w": 8, "x": 0, "y": 0 }, "hiddenSeries": false, "id": 2, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": false, "total": false, "values": false }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.1.5", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "uid": "$datasource" }, "expr": "(sum(rate(container_cpu_cfs_throttled_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "CFS throttled ({{pod}})", "refId": "A" }, { "datasource": { "uid": "$datasource" }, "expr": "(sum(rate(container_cpu_system_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_cpu_usage_seconds_kernelmode{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "System ({{pod}})", "refId": "B" }, { "datasource": { "uid": "$datasource" }, "expr": "(sum(rate(container_cpu_usage_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_cpu_usage_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "Total ({{pod}})", "refId": "C" }, { "datasource": { "uid": "$datasource" }, "expr": "(sum(rate(container_cpu_user_seconds_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(rate(windows_container_cpu_usage_seconds_usermode{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "User ({{pod}})", "refId": "D" } ], "thresholds": [], "timeRegions": [], "title": "CPU Utilization", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "cpu", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": { "{{pod}}": "#3797d5" }, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "uid": "$datasource" }, "fill": 0, "fillGradient": 0, "gridPos": { "h": 7, "w": 8, "x": 8, "y": 0 }, "hiddenSeries": false, "id": 4, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": false, "total": false, "values": false }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.1.5", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "uid": "$datasource" }, "expr": "(sum(container_memory_working_set_bytes{namespace=~\"$namespace\"} OR windows_container_memory_usage_commit_bytes{namespace=~\"$namespace\"}) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "({{pod}})", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Memory Utilization", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "decimals": 1, "format": "bytes", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": { "{{pod}}": "#3797d5" }, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "uid": "$datasource" }, "fill": 0, "fillGradient": 0, "gridPos": { "h": 7, "w": 8, "x": 16, "y": 0 }, "hiddenSeries": false, "id": 7, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": false, "total": false, "values": false }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.1.5", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "uid": "$datasource" }, "expr": "(sum(irate(container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "Receive Total ({{pod}})", "refId": "A" }, { "datasource": { "uid": "$datasource" }, "expr": "(sum(irate(container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "Transmit Total ({{pod}})", "refId": "B" }, { "datasource": { "uid": "$datasource" }, "expr": "(sum(irate(container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "Receive Dropped ({{pod}})", "refId": "C" }, { "datasource": { "uid": "$datasource" }, "expr": "(sum(irate(container_network_receive_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "Receive Errors ({{pod}})", "refId": "D" }, { "datasource": { "uid": "$datasource" }, "expr": "(sum(irate(container_network_transmit_errors_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "Transmit Errors ({{pod}})", "refId": "E" }, { "datasource": { "uid": "$datasource" }, "expr": "(sum(irate(container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_packets_dropped_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "Transmit Dropped ({{pod}})", "refId": "F" } ], "thresholds": [], "timeRegions": [], "title": "Network Traffic", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "decimals": 1, "format": "pps", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": { "{{pod}}": "#3797d5" }, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "uid": "$datasource" }, "fill": 0, "fillGradient": 0, "gridPos": { "h": 7, "w": 8, "x": 0, "y": 7 }, "hiddenSeries": false, "id": 8, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": false, "total": false, "values": false }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.1.5", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "uid": "$datasource" }, "expr": "(sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_receive_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "Receive Total ({{pod}})", "refId": "A" }, { "datasource": { "uid": "$datasource" }, "expr": "(sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod) OR sum(irate(windows_container_network_transmit_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "Transmit Total ({{pod}})", "refId": "B" } ], "thresholds": [], "timeRegions": [], "title": "Network I/O", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "decimals": 1, "format": "Bps", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": { "{{pod}}": "#3797d5" }, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "uid": "$datasource" }, "fill": 0, "fillGradient": 0, "gridPos": { "h": 7, "w": 8, "x": 8, "y": 7 }, "hiddenSeries": false, "id": 6, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": false, "total": false, "values": false }, "lines": true, "linewidth": 1, "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.1.5", "pointradius": 2, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "uid": "$datasource" }, "expr": "(sum(rate(container_fs_writes_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "Write ({{pod}})", "refId": "A" }, { "datasource": { "uid": "$datasource" }, "expr": "(sum(rate(container_fs_reads_bytes_total{namespace=~\"$namespace\"}[$__rate_interval])) by (pod)) * on(pod) kube_pod_info{namespace=~\"$namespace\", created_by_kind=\"$kind\", created_by_name=\"$workload\"}", "interval": "", "legendFormat": "Read ({{pod}})", "refId": "B" } ], "thresholds": [], "timeRegions": [], "title": "Disk I/O", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "decimals": 1, "format": "Bps", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "refresh": false, "schemaVersion": 37, "style": "dark", "tags": [], "templating": { "list": [ { "current": { "selected": false, "text": "Prometheus", "value": "Prometheus" }, "hide": 0, "includeAll": false, "label": "Data Source", "multi": false, "name": "datasource", "options": [], "query": "prometheus", "refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "current": { "selected": false, "text": "cattle-monitoring-system", "value": "cattle-monitoring-system" }, "datasource": { "type": "prometheus", "uid": "prometheus" }, "definition": "", "hide": 0, "includeAll": false, "multi": false, "name": "namespace", "options": [], "query": { "query": "query_result(kube_pod_info{namespace!=\"\"} * on(pod) group_right(namespace, created_by_kind, created_by_name) count({__name__=~\"container_.*|windows_container_.*\", pod!=\"\"}) by (pod))", "refId": "Prometheus-namespace-Variable-Query" }, "refresh": 2, "regex": "/.*namespace=\"([^\"]*)\"/", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tagsQuery": "", "type": "query", "useTags": false }, { "current": { "selected": false, "text": "StatefulSet", "value": "StatefulSet" }, "datasource": { "type": "prometheus", "uid": "prometheus" }, "definition": "", "hide": 0, "includeAll": false, "multi": false, "name": "kind", "options": [], "query": { "query": "query_result(kube_pod_info{namespace=\"$namespace\", created_by_kind!=\"\"} * on(pod) group_right(namespace, created_by_kind, created_by_name) count({__name__=~\"container_.*|windows_container_.*\", pod!=\"\"}) by (pod))", "refId": "Prometheus-kind-Variable-Query" }, "refresh": 2, "regex": "/.*created_by_kind=\"([^\"]*)\"/", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tagsQuery": "", "type": "query", "useTags": false }, { "current": { "selected": false, "text": "alertmanager-rancher-monitoring-alertmanager", "value": "alertmanager-rancher-monitoring-alertmanager" }, "datasource": { "type": "prometheus", "uid": "prometheus" }, "definition": "", "hide": 0, "includeAll": false, "multi": false, "name": "workload", "options": [], "query": { "query": "query_result(kube_pod_info{namespace=\"$namespace\", created_by_kind=\"$kind\", created_by_name!=\"\"} * on(pod) group_right(namespace, created_by_kind, created_by_name) count({__name__=~\"container_.*|windows_container_.*\", pod!=\"\"}) by (pod))", "refId": "Prometheus-workload-Variable-Query" }, "refresh": 2, "regex": "/.*created_by_name=\"([^\"]*)\"/", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tagsQuery": "", "type": "query", "useTags": false } ] }, "time": { "from": "now-1h", "to": "now" }, "timepicker": { "refresh_intervals": [ "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ] }, "timezone": "", "title": "Rancher / Workload (Pods)", "uid": "rancher-workload-pods-1", "version": 1, "weekStart": "" }

from fe.

jsers avatar jsers commented on August 24, 2024

from fe.

jsers avatar jsers commented on August 24, 2024

1、grafana 版本信息:v9.3.6 2、问题: 导入交换机端口监控的Json文档,端口图表无法扩展 1)grafana中,可以根据设备的interfaces变量,自动水平和竖直扩展 grafana: ![2222](https://

2)导入夜莺6.0.0-ga.10版本后 111

333

3、grafana

大盘 json

目前是支持基于变量 repeat 图表的,可以尝试把夜莺更新到最新版本试下

from fe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.