From 6121e1e3cfec82803d848831b33822634d4eda5c Mon Sep 17 00:00:00 2001 From: kongfei Date: Tue, 9 Aug 2022 19:28:10 +0800 Subject: [PATCH] add etcd dashboards --- k8s/apiserver-dash.json | 30 +- k8s/cm-dash.json | 34 +- k8s/etcd-dash.json | 1099 +++++++++++++++++++++++++++++++++++++++ k8s/scheduler-dash.json | 32 +- 4 files changed, 1178 insertions(+), 17 deletions(-) create mode 100644 k8s/etcd-dash.json diff --git a/k8s/apiserver-dash.json b/k8s/apiserver-dash.json index c38028e..74ec1f0 100644 --- a/k8s/apiserver-dash.json +++ b/k8s/apiserver-dash.json @@ -18,11 +18,10 @@ "links": [], "description": "apiserver的实例健康状态,0表示down,1表示up", "custom": { - "textMode": "value", + "showHeader": true, "colorMode": "value", "calc": "lastNotNull", - "colSpan": 1, - "textSize": {} + "displayMode": "seriesToRows" }, "options": { "valueMappings": [ @@ -36,14 +35,37 @@ } }, "type": "value" + }, + { + "type": "special", + "result": { + "color": "#3fc453", + "text": "UP" + }, + "match": { + "special": 1 + } + }, + { + "type": "special", + "result": { + "color": "#f80202", + "text": "DOWN" + }, + "match": { + "special": 0 + } } ], "standardOptions": { "util": "none" } }, + "overrides": [ + {} + ], "version": "2.0.0", - "type": "stat", + "type": "table", "layout": { "h": 8, "w": 12, diff --git a/k8s/cm-dash.json b/k8s/cm-dash.json index 3a43fc2..e069014 100644 --- a/k8s/cm-dash.json +++ b/k8s/cm-dash.json @@ -35,6 +35,26 @@ } }, "type": "value" + }, + { + "type": "special", + "result": { + "color": "#3fc453", + "text": "UP" + }, + "match": { + "special": 1 + } + }, + { + "type": "special", + "result": { + "color": "#f60707", + "text": "DOWN" + }, + "match": { + "special": 0 + } } ], "standardOptions": { @@ -64,7 +84,7 @@ "legend": "{{ instance }}" } ], - "name": "Controller Manager - Election master status", + "name": "Controller Manager - Member Status", "links": [], "description": "controller manager 主从状态", "custom": { @@ -92,8 +112,8 @@ { "type": "special", "result": { - "color": "#000000", - "text": "master" + "color": "#3fc453", + "text": "MASTER" }, "match": { "special": 1 @@ -102,8 +122,8 @@ { "type": "special", "result": { - "color": "#000000", - "text": "backup" + "color": "#9470ff", + "text": "BACKUP" }, "match": { "special": 0 @@ -231,7 +251,7 @@ "targets": [ { "refId": "A", - "expr": "sum(rate(rest_client_requests_total{job=\"apiserver\"}[5m])) by (instance)", + "expr": "sum(rate(rest_client_requests_total{job=\"controller-manager\"}[5m])) by (instance)", "legend": "{{ instance }}" } ], @@ -372,7 +392,7 @@ "targets": [ { "refId": "A", - "expr": "histogram_quantile(0.9, sum(rate(rest_client_request_duration_seconds_bucket{job=\"controller-manager\"}[5m])) by (instance,le))*1000", + "expr": "histogram_quantile(0.9, sum(rate(rest_client_request_duration_seconds_bucket{job=\"controller-manager\"}[5m])) by (instance,le)) * 1000", "legend": "{{ instance }}" } ], diff --git a/k8s/etcd-dash.json b/k8s/etcd-dash.json new file mode 100644 index 0000000..b3da81c --- /dev/null +++ b/k8s/etcd-dash.json @@ -0,0 +1,1099 @@ +{ + "name": "Kubernetes / Etcd", + "tags": "Categraf", + "configs": { + "version": "2.0.0", + "links": [], + "var": [], + "panels": [ + { + "targets": [ + { + "refId": "A", + "expr": "up{job=\"etcd\"}", + "legend": "{{ instance }}" + } + ], + "name": "Etcd - Health Status", + "links": [], + "description": "etcd健康状态", + "custom": { + "showHeader": true, + "colorMode": "value", + "calc": "lastNotNull", + "displayMode": "seriesToRows" + }, + "options": { + "valueMappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value" + }, + { + "type": "special", + "result": { + "color": "#3fc453", + "text": "UP" + }, + "match": { + "special": 1 + } + }, + { + "type": "special", + "result": { + "color": "#000000", + "text": "DOWN" + }, + "match": { + "special": 0 + } + } + ], + "standardOptions": { + "util": "none" + } + }, + "overrides": [ + {} + ], + "version": "2.0.0", + "type": "table", + "layout": { + "h": 6, + "w": 12, + "x": 0, + "y": 0, + "i": "5d6560c5-6137-4632-bb88-ff8c9cf42e9d", + "isResizable": true + }, + "id": "5d6560c5-6137-4632-bb88-ff8c9cf42e9d" + }, + { + "targets": [ + { + "refId": "A", + "expr": "etcd_server_is_leader{job=\"etcd\"} * on (instance) group_left(server_id) etcd_server_id{job=\"etcd\"}", + "legend": "" + } + ], + "name": "Etcd - Member Status", + "links": [], + "description": "etcd snapshot 状态", + "custom": { + "showHeader": true, + "colorMode": "value", + "calc": "lastNotNull", + "displayMode": "labelsOfSeriesToRows", + "columns": [ + "instance", + "server_id", + "value" + ] + }, + "options": { + "valueMappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value", + "result": { + "text": "" + } + }, + { + "type": "special", + "result": { + "color": "#3fc453", + "text": "LEADER" + }, + "match": { + "special": 1 + } + }, + { + "type": "special", + "result": { + "color": "#e90e17", + "text": "LERANER" + }, + "match": { + "special": 0 + } + } + ], + "standardOptions": { + "util": "none" + } + }, + "overrides": [ + { + "properties": { + "valueMappings": [] + } + } + ], + "version": "2.0.0", + "type": "table", + "layout": { + "h": 6, + "w": 12, + "x": 12, + "y": 0, + "i": "2d6c513d-5553-4635-a3f7-ec5955deb009", + "isResizable": true + }, + "id": "7480f8ad-c5a5-48e8-aec1-c6347beb3f38" + }, + { + "targets": [ + { + "refId": "A", + "expr": "etcd_server_health_success{job=\"etcd\"}", + "legend": "{{ instance }} - check success" + }, + { + "expr": "etcd_server_health_failures{job=\"etcd\"}", + "refId": "B", + "legend": "{{ instance }} - check failure" + } + ], + "name": "Etcd - Health Check Stats", + "links": [], + "description": "etcd 健康检查状态", + "custom": { + "showHeader": true, + "colorMode": "value", + "calc": "lastNotNull", + "displayMode": "seriesToRows" + }, + "options": { + "valueMappings": [], + "standardOptions": { + "util": "none" + } + }, + "overrides": [ + { + "properties": { + "valueMappings": [] + } + } + ], + "version": "2.0.0", + "type": "table", + "layout": { + "h": 8, + "w": 12, + "x": 0, + "y": 6, + "i": "e8794091-aff6-4dbf-9876-685a6f277794", + "isResizable": true + }, + "id": "db5575c1-0859-4b42-b327-5dd57f1e1225" + }, + { + "targets": [ + { + "refId": "A", + "expr": "etcd_disk_defrag_inflight{job=\"etcd\"}", + "legend": "{{ instance }}" + } + ], + "name": "Etcd - Defrag Status", + "links": [], + "description": "etcd defrag(压缩) 状态", + "custom": { + "showHeader": true, + "colorMode": "value", + "calc": "lastNotNull", + "displayMode": "seriesToRows" + }, + "options": { + "valueMappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value", + "result": { + "text": "" + } + }, + { + "type": "special", + "result": { + "color": "#3fc453", + "text": "DEFRAG" + }, + "match": { + "special": 1 + } + }, + { + "type": "special", + "result": { + "color": "#9470ff", + "text": "-" + }, + "match": { + "special": 0 + } + } + ], + "standardOptions": { + "util": "none" + } + }, + "overrides": [ + { + "properties": { + "valueMappings": [] + } + } + ], + "version": "2.0.0", + "type": "table", + "layout": { + "h": 8, + "w": 12, + "x": 12, + "y": 6, + "i": "ce4a873d-65f0-4071-868c-e67d6b723ab6", + "isResizable": true + }, + "id": "69d1bab4-1b37-4ece-9630-d8e3e105ce4e" + }, + { + "targets": [ + { + "refId": "A", + "expr": "etcd_server_snapshot_apply_in_progress_total{job=\"etcd\"}", + "legend": "{{ instance }}" + } + ], + "name": "Etcd - Snapshot Status", + "links": [], + "description": "etcd snapshot(快照) 状态", + "custom": { + "showHeader": true, + "colorMode": "value", + "calc": "lastNotNull", + "displayMode": "seriesToRows" + }, + "options": { + "valueMappings": [ + { + "options": { + "0": { + "text": "DOWN" + }, + "1": { + "text": "UP" + } + }, + "type": "value", + "result": { + "text": "" + } + }, + { + "type": "special", + "result": { + "color": "#3fc453", + "text": "APPLYING" + }, + "match": { + "special": 1 + } + }, + { + "type": "special", + "result": { + "color": "#9470ff", + "text": "-" + }, + "match": { + "special": 0 + } + } + ], + "standardOptions": { + "util": "none" + } + }, + "overrides": [ + { + "properties": { + "valueMappings": [] + } + } + ], + "version": "2.0.0", + "type": "table", + "layout": { + "h": 8, + "w": 12, + "x": 0, + "y": 14, + "i": "a5d1ef0c-83e3-4194-b242-d5c51ba4bdd2", + "isResizable": true + }, + "id": "62e3b249-fefe-4f32-8baf-394eac053f2a" + }, + { + "targets": [ + { + "refId": "A", + "expr": "etcd_server_leader_changes_seen_total{job=\"etcd\"}", + "legend": "{{ instance }}" + } + ], + "name": "Etcd - Leader Change Stats", + "links": [], + "description": "etcd leader切换统计", + "custom": { + "showHeader": true, + "colorMode": "value", + "calc": "lastNotNull", + "displayMode": "seriesToRows" + }, + "options": { + "valueMappings": [], + "standardOptions": { + "util": "none" + } + }, + "overrides": [ + { + "properties": { + "valueMappings": [] + } + } + ], + "version": "2.0.0", + "type": "table", + "layout": { + "h": 8, + "w": 12, + "x": 12, + "y": 14, + "i": "25b5262d-a318-4489-9dae-152d31906704", + "isResizable": true + }, + "id": "be940718-c4ac-4f6f-a966-dd1961a9e019" + }, + { + "targets": [ + { + "refId": "A", + "expr": "sum(rate(grpc_server_handled_total{job=\"etcd\"}[5m])) by (instance,grpc_code)", + "legend": "{{ instance }} {{ grpc_code }}" + } + ], + "name": "Etcd - Requests by code", + "links": [], + "description": "etcd 处理的请求数,按响应码统计", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "none" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 0, + "y": 22, + "i": "94713dc3-acb7-43b5-ae2f-399b2da61763", + "isResizable": true + }, + "id": "94713dc3-acb7-43b5-ae2f-399b2da61763" + }, + { + "targets": [ + { + "refId": "A", + "expr": "sum(rate(grpc_server_handled_total{job=\"etcd\"}[5m])) by (instance)", + "legend": "{{ instance }}" + } + ], + "name": "Etcd -Requests by instance", + "links": [], + "description": "etcd处理的请求数, 按实例统计", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "none" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 12, + "y": 22, + "i": "69690063-d044-4547-9f5f-126e5f8bf55a", + "isResizable": true + }, + "id": "69690063-d044-4547-9f5f-126e5f8bf55a" + }, + { + "targets": [ + { + "refId": "A", + "expr": "sum(rate(grpc_server_handled_total{job=\"etcd\",grpc_method=~\"Compact|Defrag.*|Member.*|Put|Watch|Lease.*|Range|Snapshot|Txn|Hash.*|Status|Auth.*\"}[5m])) by (instance,grpc_method)", + "legend": "{{ instance }} {{ grpc_method }}" + } + ], + "name": "Etcd - Requests by verb", + "links": [], + "description": "etcd处理的请求数,按请求类型统计", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "none" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 0, + "y": 30, + "i": "a6928b49-cf0a-443e-a8fd-b999685df0be", + "isResizable": true + }, + "id": "a6928b49-cf0a-443e-a8fd-b999685df0be" + }, + { + "targets": [ + { + "refId": "A", + "expr": "histogram_quantile(0.9, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=\"etcd\"}[5m])) by (instance,le))*1000", + "legend": "{{ instance }}" + } + ], + "name": "Etcd - WAL Fsync Latancy by instance", + "links": [], + "description": "etcd 90分位WAL fsync耗时", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "milliseconds" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 12, + "y": 30, + "i": "75671720-bca1-449f-9c68-bf562f105b66", + "isResizable": true + }, + "id": "80bd434e-21dc-4864-97c6-bfd1e2e27bbe" + }, + { + "targets": [ + { + "refId": "A", + "expr": "histogram_quantile(0.9, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=\"etcd\"}[5m])) by (instance,le))*1000", + "legend": "{{ instance }} " + } + ], + "name": "Etcd - Commit Latancy by instance", + "links": [], + "description": "etcd 90分位commit耗时", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "milliseconds" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 0, + "y": 38, + "i": "d5a67103-9930-46e0-97e1-296e0d71e30e", + "isResizable": true + }, + "id": "053d10f3-1113-40e0-85aa-dfbabb706995" + }, + { + "targets": [ + { + "refId": "A", + "expr": "histogram_quantile(0.9, sum(rate(etcd_disk_backend_defrag_duration_seconds_bucket{job=\"etcd\"}[5m])) by (instance,le))*1000", + "legend": "{{ instance }}" + } + ], + "name": "Etcd - Defrag Latancy by instance", + "links": [], + "description": "etcd 90分位defrag耗时", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "milliseconds" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 12, + "y": 38, + "i": "2924bb3f-20c3-4f56-96ff-76d473743d8b", + "isResizable": true + }, + "id": "c86ed101-a91c-4478-b67a-7182a5e856d1" + }, + { + "targets": [ + { + "refId": "A", + "expr": "histogram_quantile(0.9, sum(rate(etcd_disk_backend_snapshot_duration_seconds_bucket{job=\"etcd\"}[5m])) by (instance,le))*1000", + "legend": "{{ instance }}" + } + ], + "name": "Etcd - Snapshot Latancy by instance", + "links": [], + "description": "etcd 90分位snapshot耗时", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "milliseconds" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 0, + "y": 46, + "i": "e4ec9053-5700-4ede-abfa-35f115597665", + "isResizable": true + }, + "id": "5c6c48fd-b12b-49d7-86df-b86d90134339" + }, + { + "targets": [ + { + "refId": "A", + "expr": "sum by(instance) (rate(etcd_server_proposals_failed_total{job=\"etcd\"}[5m]))", + "legend": "{{ instance }} failure" + }, + { + "expr": "etcd_server_proposals_pending{job=\"etcd\"}", + "refId": "B", + "legend": "{{ instance }} pending" + } + ], + "name": "Etcd - Proposal Failures/Pending by instance", + "links": [], + "description": "etcd协商失败/pending次数", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "none" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 12, + "y": 46, + "i": "152b5817-ad87-44d0-a71f-5fbd0fc10ca3", + "isResizable": true + }, + "id": "b6931f1f-6c43-478e-bcc7-26d1b121bceb" + }, + { + "targets": [ + { + "refId": "A", + "expr": "sum (rate(etcd_server_read_indexes_failed_total{job=\"etcd\"}[5m])) by (instance)", + "legend": "{{ instance }} failure read" + }, + { + "expr": "sum(rate(etcd_server_slow_read_indexes_total{job=\"etcd\"}[5m])) by (instance)", + "refId": "B", + "legend": "{{ instance }} slow read" + } + ], + "name": "Etcd - Server Read Indexes Failure / Slow Read", + "links": [], + "description": "etcd读取索引失败 读取索引慢(过期索引或者超时)次数", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "none" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 0, + "y": 54, + "i": "784d72f7-fb4e-46e3-b632-e70df6dde0a7", + "isResizable": true + }, + "id": "369af7f4-9851-4c8c-a186-04db4fa7f90f" + }, + { + "targets": [ + { + "refId": "A", + "expr": "etcd_server_quota_backend_bytes{job=\"etcd\"}", + "legend": "{{ instance }} quota" + }, + { + "expr": "etcd_mvcc_db_total_size_in_bytes{job=\"etcd\"}", + "refId": "B", + "legend": "{{ instance }} total size" + }, + { + "expr": "etcd_mvcc_db_total_size_in_use_in_bytes", + "refId": "C", + "legend": "{{ instance }} in use" + } + ], + "name": "Etcd - MVCC DB Size", + "links": [], + "description": "etcd 存储quota/total/in use大小", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "bytesIEC" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 12, + "y": 54, + "i": "730be715-cfdd-4f2a-b878-1b2fb9a9be45", + "isResizable": true + }, + "id": "ed72c89c-9732-4fb0-9187-0cabe9a4a81c" + }, + { + "targets": [ + { + "refId": "A", + "expr": "sum(rate(etcd_mvcc_range_total{job=\"etcd\"}[5m])) by (instance)", + "legend": "{{ instance }} range" + }, + { + "expr": "sum(rate(etcd_mvcc_put_total{job=\"etcd\"}[5m])) by (instance)", + "refId": "B", + "legend": "{{ instance }} put" + }, + { + "expr": "sum(rate(etcd_mvcc_delete_total{job=\"etcd\"}[5m])) by (instance)", + "refId": "C", + "legend": "{{ instance }} delete" + }, + { + "expr": "sum(rate(etcd_mvcc_txn_total{job=\"etcd\"}[5m])) by (instance)", + "refId": "D", + "legend": "{{ instance }} txn" + } + ], + "name": "Etcd - Operations Stats by instance", + "links": [], + "description": "etcd操作类型统计", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "milliseconds" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 0, + "y": 62, + "i": "cfc389ad-5648-4107-a5bd-1680f6ede2ed", + "isResizable": true + }, + "id": "32a09298-d0f8-4d54-808e-d223d0a428ff" + }, + { + "targets": [ + { + "refId": "A", + "expr": "rate(process_cpu_seconds_total{job=\"etcd\"}[5m])", + "legend": "{{ instance }}" + } + ], + "name": "Etcd - CPU Usage by instance", + "links": [], + "description": "etcd cpu使用率", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "percentUnit", + "decimals": 2 + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 12, + "y": 62, + "i": "9c187c1c-f5cd-4aab-af81-09169948ab82", + "isResizable": true + }, + "id": "9c187c1c-f5cd-4aab-af81-09169948ab82" + }, + { + "targets": [ + { + "refId": "A", + "expr": "process_resident_memory_bytes{job=\"etcd\"}", + "legend": "{{ instance }}" + } + ], + "name": "Etcd - Memory Usage by instance", + "links": [], + "description": "etcd 内存使用量", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list", + "placement": "bottom" + }, + "standardOptions": { + "util": "bytesIEC" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 0, + "y": 70, + "i": "8cff2618-b2d4-4fb4-bfc2-d1d4c4f1b35c", + "isResizable": true + }, + "id": "8cff2618-b2d4-4fb4-bfc2-d1d4c4f1b35c" + }, + { + "targets": [ + { + "refId": "A", + "expr": "process_open_fds{job=\"etcd\"}", + "legend": "{{ instance }}" + } + ], + "name": "Etcd - Open fds by instance", + "links": [], + "description": "etcd打开的fd数量", + "options": { + "tooltip": { + "mode": "all", + "sort": "desc" + }, + "legend": { + "displayMode": "list" + }, + "standardOptions": { + "util": "none" + }, + "thresholds": { + "steps": [] + } + }, + "custom": { + "drawStyle": "lines", + "lineInterpolation": "smooth", + "lineWidth": 1, + "fillOpacity": 0.25, + "gradientMode": "none", + "stack": "off" + }, + "version": "2.0.0", + "type": "timeseries", + "layout": { + "h": 8, + "w": 12, + "x": 12, + "y": 70, + "i": "e438aed2-6d4a-4254-a8ec-26752385dc74", + "isResizable": true + }, + "id": "94bb09a7-dbf7-41d8-b6a4-16b262365474" + } + ] + } +} diff --git a/k8s/scheduler-dash.json b/k8s/scheduler-dash.json index 2b96324..2b90c85 100644 --- a/k8s/scheduler-dash.json +++ b/k8s/scheduler-dash.json @@ -35,6 +35,26 @@ } }, "type": "value" + }, + { + "type": "special", + "result": { + "color": "#3fc453", + "text": "UP" + }, + "match": { + "special": 1 + } + }, + { + "type": "special", + "result": { + "color": "#f80202", + "text": "DOWN" + }, + "match": { + "special": 0 + } } ], "standardOptions": { @@ -64,7 +84,7 @@ "legend": "{{ instance }}" } ], - "name": "Scheduler - Election master status", + "name": "Scheduler - Member Status", "links": [], "description": "scheduler 主从状态", "custom": { @@ -92,8 +112,8 @@ { "type": "special", "result": { - "color": "#000000", - "text": "master" + "color": "#3fc453", + "text": "MASTER" }, "match": { "special": 1 @@ -102,8 +122,8 @@ { "type": "special", "result": { - "color": "#000000", - "text": "backup" + "color": "#9470ff", + "text": "BACKUP" }, "match": { "special": 0 @@ -231,7 +251,7 @@ "targets": [ { "refId": "A", - "expr": "sum(rate(rest_client_requests_total{job=\"apiserver\"}[5m])) by (instance)", + "expr": "sum(rate(rest_client_requests_total{job=\"scheduler\"}[5m])) by (instance)", "legend": "{{ instance }}" } ],