categraf/k8s/apiserver-dash.json

642 lines
23 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"name": "Kubernetes / API Server",
"tags": "Categraf",
"configs": {
"version": "2.0.0",
"links": [],
"var": [],
"panels": [
{
"targets": [
{
"refId": "A",
"expr": "up{job=\"apiserver\"}",
"legend": "{{ instance }}"
}
],
"name": "API Server - Health Status",
"links": [],
"description": "apiserver的实例健康状态0表示down1表示up",
"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": "#f80202",
"text": "DOWN"
},
"match": {
"special": 0
}
}
],
"standardOptions": {
"util": "none"
}
},
"overrides": [
{}
],
"version": "2.0.0",
"type": "table",
"layout": {
"h": 8,
"w": 12,
"x": 0,
"y": 0,
"i": "98f46bc1-c078-40f2-915c-f0836957bf2f",
"isResizable": true
},
"id": "98f46bc1-c078-40f2-915c-f0836957bf2f"
},
{
"targets": [
{
"refId": "A",
"expr": "apiserver_requested_deprecated_apis{job=\"apiserver\"}",
"legend": ""
}
],
"name": "Deprecated Kubernetes Resources",
"links": [],
"description": "当前版本apiserver使用未来版本中要移除的资源",
"custom": {
"showHeader": true,
"colorMode": "value",
"calc": "lastNotNull",
"displayMode": "labelsOfSeriesToRows",
"columns": [
"group",
"version",
"resource",
"removed_release"
],
"sortOrder": "ascend"
},
"options": {
"standardOptions": {}
},
"overrides": [
{}
],
"version": "2.0.0",
"type": "table",
"layout": {
"h": 8,
"w": 12,
"x": 12,
"y": 0,
"i": "73beb13a-bd10-4a68-bb9e-5b9ab63da154",
"isResizable": true
},
"id": "73beb13a-bd10-4a68-bb9e-5b9ab63da154"
},
{
"targets": [
{
"refId": "A",
"expr": "sum by (instance,code) (rate(apiserver_request_total{job=\"apiserver\"}[5m]))",
"legend": "{{ instance }} {{ code }}"
}
],
"name": "API Server - HTTP Requests by code",
"links": [],
"description": "按照返回码分类统计apiserver请求数",
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"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": 8,
"i": "1cfa42b1-9dcf-471c-90ff-8ffe656d4b11",
"isResizable": true
},
"id": "1cfa42b1-9dcf-471c-90ff-8ffe656d4b11"
},
{
"targets": [
{
"refId": "A",
"expr": "sum by (instance,verb) (rate(apiserver_request_total{job=\"apiserver\"}[5m]))",
"legend": "{{ instance }} {{ verb }}"
}
],
"name": "API Server - HTTP Requests by verb",
"links": [],
"description": "按照请求动作分类统计apiserver的请求数",
"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": 8,
"i": "94def0cb-0b86-42f7-a4b2-dde714bbb918",
"isResizable": true
},
"id": "94def0cb-0b86-42f7-a4b2-dde714bbb918"
},
{
"targets": [
{
"refId": "A",
"expr": "apiserver_current_inflight_requests{job=\"apiserver\"}",
"legend": "{{ instance }} {{ request_kind }}"
}
],
"name": "API Server - Current Inflight Requests by kind",
"links": [],
"description": "当前并发请求apiserver的数量",
"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": 16,
"i": "ce5a15ad-11c6-44a2-a071-be57009162e1",
"isResizable": true
},
"id": "fb6266a3-3da0-4310-bfe8-c64a53db5db3"
},
{
"targets": [
{
"refId": "A",
"expr": "histogram_quantile(0.9, sum(rate(apiserver_request_duration_seconds_bucket{job=\"apiserver\"}[5m])) by (instance,verb,le))*1000",
"legend": "{{ instance }} {{ verb }}"
}
],
"name": "API Server - HTTP Requets Latency by verb",
"links": [],
"description": "apiserver的响应延迟按请求动作分类统计",
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"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": 16,
"i": "045dca2d-d69b-47a7-b25e-656adb357e11",
"isResizable": true
},
"id": "045dca2d-d69b-47a7-b25e-656adb357e11"
},
{
"targets": [
{
"refId": "A",
"expr": "histogram_quantile(0.9, sum(rate(apiserver_request_duration_seconds_bucket {job=\"apiserver\",verb!=\"WATCH\"}[5m])) by (instance,le))*1000",
"legend": "{{ instance }}"
}
],
"name": "API Server - HTTP Requets Latency by instance",
"links": [],
"description": "apiserver的响应延迟(非watch请求",
"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": 24,
"i": "1e775704-9ee4-45ce-9d24-b49af89fb5c7",
"isResizable": true
},
"id": "1e775704-9ee4-45ce-9d24-b49af89fb5c7"
},
{
"targets": [
{
"refId": "A",
"expr": "sum by(instance,verb) (rate(apiserver_request_total{code=~\"5..\",job=\"apiserver\"}[5m]))\n / sum by(instance,verb) (rate(apiserver_request_total{job=\"apiserver\"}[5m]))",
"legend": "{{ instance }} {{ verb }}"
}
],
"name": "API Server - Errors by verb",
"links": [],
"description": "apiserver的5xx错误率按请求动作分类统计",
"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": 24,
"i": "1ca62e0b-72df-47d1-93ba-048ed49e9cb5",
"isResizable": true
},
"id": "1ca62e0b-72df-47d1-93ba-048ed49e9cb5"
},
{
"targets": [
{
"refId": "A",
"expr": "sum by(instance) (rate(apiserver_request_total{code=~\"5..\", job=\"apiserver\"}[5m]))\n / sum by(instance) (rate(apiserver_request_total{job=\"apiserver\"}[5m]))",
"legend": "{{ instance }}"
}
],
"name": "API Server - Errors by Instance",
"links": [],
"description": "apiserver的5xx 错误率(5xx请求数/总请求数)",
"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": 32,
"i": "92a209a1-7d30-4627-9ae1-55ded5095ed7",
"isResizable": true
},
"id": "92a209a1-7d30-4627-9ae1-55ded5095ed7"
},
{
"targets": [
{
"refId": "A",
"expr": "sum(rate(workqueue_depth{job=\"apiserver\"}[5m])) by (instance,name)",
"legend": "{{ instance }} {{ name }}"
}
],
"name": "API Server - Work Queue by instance",
"links": [],
"description": "apiserver工作队列深度越接近0越好",
"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": 32,
"i": "83f22cf4-9c65-4ad3-900b-fa6fc914dd88",
"isResizable": true
},
"id": "83f22cf4-9c65-4ad3-900b-fa6fc914dd88"
},
{
"targets": [
{
"refId": "A",
"expr": "sum(rate(apiserver_request_total{job=\"apiserver\"}[5m])) by (instance)",
"legend": "{{ instance }}"
}
],
"name": "API Server - HTTP Requests by instance",
"links": [],
"description": "5分钟内apiserver的请求数统计",
"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": "normal"
},
"version": "2.0.0",
"type": "timeseries",
"layout": {
"h": 8,
"w": 12,
"x": 0,
"y": 40,
"i": "3e9f9df7-d9fb-4791-b3b2-2c52678f060f",
"isResizable": true
},
"id": "3e9f9df7-d9fb-4791-b3b2-2c52678f060f"
},
{
"targets": [
{
"refId": "A",
"expr": "rate(process_cpu_seconds_total{job=\"apiserver\"}[5m])",
"legend": "{{ instance }}"
}
],
"name": "API Server - CPU Usage by instance",
"links": [],
"description": "apiserver的cpu使用率",
"options": {
"tooltip": {
"mode": "all",
"sort": "desc"
},
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"util": "percent",
"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": 40,
"i": "3d5c1ae5-e640-4986-9202-78258169bffb",
"isResizable": true
},
"id": "3d5c1ae5-e640-4986-9202-78258169bffb"
},
{
"targets": [
{
"refId": "A",
"expr": "process_resident_memory_bytes{job=\"apiserver\"}",
"legend": "{{ instance }}"
}
],
"name": "API Server - Memory Usage by instance",
"links": [],
"description": "apiserver的内存使用量",
"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": 48,
"i": "1550a2d5-c808-4174-865a-a41b2c16b486",
"isResizable": true
},
"id": "1550a2d5-c808-4174-865a-a41b2c16b486"
}
]
}
}