此看板引用了kube-state-metrics 与cadvisor 数据
json
{
"name": "cim-prod-k8s",
"tags": "mes",
"ident": "",
"uuid": 1770279277286000,
"configs": {
"links": [],
"panels": [
{
"type": "table",
"id": "eeb56afe-8a3e-46d6-8923-aeb3d0f124ea",
"layout": {
"h": 6,
"w": 24,
"x": 0,
"y": 0,
"i": "eeb56afe-8a3e-46d6-8923-aeb3d0f124ea",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "配置",
"links": [],
"maxPerRow": 4,
"custom": {
"showHeader": true,
"colorMode": "value",
"nowrap": true,
"tableLayout": "auto",
"calc": "lastNotNull",
"displayMode": "labelValuesToRows",
"aggrDimension": [
"ident",
"namespace",
"container",
"pod"
],
"pageLimit": 500,
"linkMode": "appendLinkColumn"
},
"options": {
"valueMappings": [],
"standardOptions": {}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
}
}
],
"targets": [
{
"expr": "max(container_spec_cpu_quota{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"} / container_spec_cpu_period{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}) by (ident,namespace,container,pod)",
"legend": "CPU 上限",
"refId": "A",
"instant": true
},
{
"expr": "max(container_spec_memory_limit_bytes{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"})by (ident,namespace,container,pod)",
"__mode__": "__query__",
"refId": "B",
"legend": "内存上限",
"instant": true
},
{
"expr": "max(container_fs_limit_bytes{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"})by (ident,namespace,container,pod)",
"__mode__": "__query__",
"refId": "C",
"legend": "磁盘上限",
"instant": true
},
{
"expr": "(time() - container_start_time_seconds{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}) / 86400 ",
"__mode__": "__query__",
"refId": "D",
"legend": "运行时长(天)"
}
]
},
{
"type": "table",
"id": "b35b4a97-38a5-41ea-aeb9-dd5e9de8649b",
"layout": {
"h": 5,
"w": 24,
"x": 0,
"y": 6,
"i": "36192968-160a-4f3e-8f7b-3bbeec73fe59",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": 1,
"name": "运行状态",
"links": [],
"maxPerRow": 4,
"custom": {
"showHeader": true,
"colorMode": "value",
"nowrap": true,
"tableLayout": "auto",
"calc": "lastNotNull",
"displayMode": "labelsOfSeriesToRows",
"pageLimit": 500,
"linkMode": "appendLinkColumn",
"columns": [
"namespace",
"pod",
"phase"
]
},
"options": {
"valueMappings": [],
"standardOptions": {}
},
"overrides": [
{
"matcher": {
"id": "byName",
"value": "phase"
},
"properties": {
"valueMappings": [
{
"type": "textValue",
"result": {
"color": "rgba(63, 196, 83, 1)",
"text": "运行中"
},
"match": {
"special": 1,
"textValue": "Running"
}
},
{
"type": "textValue",
"result": {
"color": "rgba(206, 79, 82, 1)",
"text": "失败"
},
"match": {
"textValue": "Failed"
}
},
{
"type": "textValue",
"result": {
"color": "rgba(255, 153, 25, 1)",
"text": "等待"
},
"match": {
"textValue": "Pending"
}
},
{
"type": "textValue",
"result": {
"color": "rgba(35, 110, 29, 1)",
"text": "成功完成"
},
"match": {
"textValue": "Succeeded"
}
},
{
"type": "textValue",
"result": {
"color": "#000000",
"text": "状态未知"
},
"match": {
"textValue": "Unknown"
}
}
]
}
}
],
"targets": [
{
"refId": "A",
"expr": "kube_pod_status_phase{namespace=~\"$namespace\", pod=~\"$pod\"} == 1"
}
]
},
{
"type": "timeseries",
"id": "94c84394-965d-448b-a5a6-3203a9d39b96",
"layout": {
"h": 7,
"w": 24,
"x": 0,
"y": 11,
"i": "d633bf9d-2fdb-4eed-ae27-40dab645ef7d",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "CPU 使用率",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "percentUnit"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "rate(container_cpu_usage_seconds_total{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}[5m])/on(ident,container, namespace, pod) (container_spec_cpu_quota{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"} / container_spec_cpu_period{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"})",
"legend": "{{pod}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "6690fff4-c159-40e5-b340-65a3ba85e37e",
"layout": {
"h": 7,
"w": 24,
"x": 0,
"y": 18,
"i": "6690fff4-c159-40e5-b340-65a3ba85e37e",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "内存使用率",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "percentUnit"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "container_memory_usage_bytes{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}/ on(pod, container, namespace) container_spec_memory_limit_bytes{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}",
"legend": "{{pod}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "62dc059a-84c2-4405-a1a1-5ab95c29ab7c",
"layout": {
"h": 7,
"w": 24,
"x": 0,
"y": 25,
"i": "f113344e-8f89-456f-9983-d8632164ca83",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "磁盘使用量",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "bytesIEC"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "container_fs_usage_bytes{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}",
"legend": "{{pod}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "94fce650-2766-4066-b00c-9cd01cfcf854",
"layout": {
"h": 7,
"w": 24,
"x": 0,
"y": 32,
"i": "1e4d7b13-4496-4b91-8aca-9fcc1660e67e",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "磁盘使用率",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "percentUnit"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "container_fs_usage_bytes{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}/ on(pod, container, namespace) container_fs_limit_bytes{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}",
"legend": "{{pod}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "d8ae94d9-06f5-4751-976b-d793ef522bd2",
"layout": {
"h": 7,
"w": 24,
"x": 0,
"y": 39,
"i": "7ae3e6ab-0306-40b8-bc50-710e12da5f83",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "IO繁忙率",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "percentUnit",
"max": 1
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "rate(container_fs_io_time_seconds_total{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}[5m])",
"legend": "{{pod}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "d7180056-89ef-407d-a357-91814abd9dce",
"layout": {
"h": 7,
"w": 12,
"x": 0,
"y": 46,
"i": "bcc4973f-9955-44a2-aeea-7a98d7119cfb",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "读速率",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "bytesSecIEC",
"max": null
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "rate(container_fs_reads_bytes_total{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}[5m])",
"legend": "{{pod}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "92209ce2-304a-422a-b615-fc674ca329df",
"layout": {
"h": 7,
"w": 12,
"x": 12,
"y": 46,
"i": "034b7cbf-483b-4cff-884b-41a350d90b48",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "写速率",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "bytesSecIEC",
"max": null
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "rate(container_fs_writes_bytes_total{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}[5m])",
"legend": "{{pod}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "f3680252-2d16-4170-a127-b1d28f5eb345",
"layout": {
"h": 7,
"w": 12,
"x": 0,
"y": 53,
"i": "a2de56d4-a6fe-43d9-8862-216aa4878819",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "读IOPS",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "rps",
"max": null
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "rate(container_fs_reads_total{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}[5m])",
"legend": "{{pod}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "a89c4157-981a-40f8-abb3-1f05bc8db0d9",
"layout": {
"h": 7,
"w": 12,
"x": 12,
"y": 53,
"i": "23aba25b-9678-435c-b38c-addc1efd68cc",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "写IOPS",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "wps",
"max": null
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "rate(container_fs_writes_total{ident=~\"$ident\",namespace=~\"$namespace\",container=~\"$container\",pod=~\"$pod\"}[5m])",
"legend": "{{pod}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "111835e1-cfb5-40db-bb52-1aca74cf1a00",
"layout": {
"h": 8,
"w": 12,
"x": 0,
"y": 60,
"i": "111835e1-cfb5-40db-bb52-1aca74cf1a00",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "实时接收带宽",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "bytesSecIEC"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "rate(container_network_receive_packets_total{ident=~\"$ident\",namespace=~\"$namespace\",pod=~\"$pod\"}[5m])",
"legend": "{{ident}}-{{namespace}}-{{pod}}-{{interface}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "50aa5e90-b608-45ca-8236-28c1cbca460f",
"layout": {
"h": 8,
"w": 12,
"x": 12,
"y": 60,
"i": "963ac689-bd3d-45d8-844f-baa7a3460116",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "实时发送带宽",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "bytesSecIEC"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "rate(container_network_transmit_bytes_total{ident=~\"$ident\",namespace=~\"$namespace\",pod=~\"$pod\"}[5m])",
"legend": "{{ident}}-{{namespace}}-{{pod}}-{{interface}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "b77e6c44-6987-4c0a-864c-3f8cd9a3b036",
"layout": {
"h": 8,
"w": 12,
"x": 0,
"y": 68,
"i": "138fdaaf-2fbe-4168-9827-9c69654045f9",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "接收丢包率",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "percentUnit",
"max": 1
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "rate(container_network_receive_packets_dropped_total{ident=~\"$ident\",namespace=~\"$namespace\",pod=~\"$pod\"}[5m]) / rate(container_network_receive_packets_total{ident=~\"$ident\",namespace=~\"$namespace\",pod=~\"$pod\"}[5m])",
"legend": "{{ident}}-{{namespace}}-{{pod}}-{{interface}}",
"refId": "A"
}
]
},
{
"type": "timeseries",
"id": "90a61bfb-e20f-4903-98a4-7656e3017621",
"layout": {
"h": 8,
"w": 12,
"x": 12,
"y": 68,
"i": "b1946e23-bf58-4fad-856c-f98232a08ea5",
"isResizable": true
},
"version": "3.1.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"name": "发送丢包率",
"links": [],
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden",
"placement": "bottom",
"behaviour": "showItem",
"selectMode": "single"
},
"standardOptions": {
"util": "percentUnit",
"max": 1
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"thresholdsStyle": {
"mode": "dashed"
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "linear",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
},
"showPoints": "none",
"pointSize": 5
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "rate(container_network_transmit_packets_dropped_total{ident=~\"$ident\",namespace=~\"$namespace\",pod=~\"$pod\"}[5m]) / rate(container_network_transmit_packets_total{ident=~\"$ident\",namespace=~\"$namespace\",pod=~\"$pod\"}[5m])",
"legend": "{{ident}}-{{namespace}}-{{pod}}-{{interface}}",
"refId": "A"
}
]
}
],
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource"
},
{
"name": "namespace",
"type": "query",
"hide": false,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values({__name__=~\"container.*\"},namespace)",
"multi": true,
"allOption": true
},
{
"name": "ident",
"type": "query",
"hide": false,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"reg": "",
"definition": "label_values({__name__=~\"container.*\"},ident)",
"multi": true,
"allOption": true
},
{
"name": "container",
"type": "query",
"hide": false,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"reg": "",
"definition": "label_values({__name__=~\"container.*\", ident=~\"$ident\",namespace=~\"$namespace\",container!=\"POD\"},container)",
"multi": true,
"allOption": true
},
{
"name": "pod",
"type": "query",
"hide": false,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values({__name__=~\"container.*\", ident=~\"$ident\",namespace=~\"$namespace\",container!=\"POD\",container=~\"$container\"},pod)",
"multi": true,
"allOption": true
}
],
"version": "3.0.0"
}
}