Skip to content

Instantly share code, notes, and snippets.

@brandond
Created May 25, 2021 20:25
Show Gist options
  • Save brandond/1c270e35034ea417075c5115ee1d29af to your computer and use it in GitHub Desktop.
Save brandond/1c270e35034ea417075c5115ee1d29af to your computer and use it in GitHub Desktop.
WIP grafana dashboard for Kubernetes apiserver datastore performance metrics
{
"__inputs": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "7.4.5"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "panel",
"id": "heatmap",
"name": "Heatmap",
"version": ""
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 1,
"id": null,
"iteration": 1621974229574,
"links": [],
"panels": [
{
"cards": {
"cardPadding": null,
"cardRound": null
},
"color": {
"cardColor": "#b4ff00",
"colorScale": "sqrt",
"colorScheme": "interpolateTurbo",
"exponent": 0.5,
"min": 0,
"mode": "spectrum"
},
"dataFormat": "tsbuckets",
"datasource": "$datasource",
"fieldConfig": {
"defaults": {
"custom": {},
"thresholds": {
"mode": "absolute",
"steps": []
}
},
"overrides": []
},
"gridPos": {
"h": 12,
"w": 23,
"x": 0,
"y": 0
},
"heatmap": {},
"hideZeroBuckets": false,
"highlightCards": true,
"id": 2,
"interval": "",
"legend": {
"show": true
},
"pluginVersion": "7.0.3",
"repeat": null,
"repeatDirection": "h",
"reverseYBuckets": false,
"targets": [
{
"expr": "sum(increase(etcd_request_duration_seconds_bucket{instance=~\"$instance\",operation=~\"$operation\",type=~\"$type\"}[$__interval])) by (le)",
"format": "heatmap",
"interval": "1m",
"legendFormat": "{{le}}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Request Duration Histogram",
"tooltip": {
"show": true,
"showHistogram": false
},
"tooltipDecimals": 3,
"type": "heatmap",
"xAxis": {
"show": true
},
"xBucketNumber": null,
"xBucketSize": null,
"yAxis": {
"decimals": 0,
"format": "s",
"logBase": 1,
"max": null,
"min": null,
"show": true,
"splitFactor": null
},
"yBucketBound": "auto",
"yBucketNumber": null,
"yBucketSize": null
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "$datasource",
"fieldConfig": {
"defaults": {
"custom": {},
"links": []
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 5,
"w": 23,
"x": 0,
"y": 12
},
"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 as zero",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.4.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "histogram_quantile(0.99, avg(rate(etcd_request_duration_seconds_bucket{instance=~\"$instance\",operation=~\"$operation\",type=~\"$type\"}[$__interval])) by (le))",
"interval": "1m",
"legendFormat": "",
"refId": "A"
}
],
"thresholds": [
{
"colorMode": "warning",
"fill": false,
"line": true,
"op": "gt",
"value": 0.1,
"yaxis": "left"
},
{
"colorMode": "critical",
"fill": false,
"line": true,
"op": "gt",
"value": 1,
"yaxis": "left"
}
],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Request Duration P99",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "s",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "$datasource",
"fieldConfig": {
"defaults": {
"custom": {},
"links": []
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 5,
"w": 23,
"x": 0,
"y": 17
},
"hiddenSeries": false,
"id": 6,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.4.5",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(rate(etcd_request_duration_seconds_count{instance=~\"$instance\",operation=~\"$operation\",type=~\"$type\"}[$__interval]))",
"interval": "1m",
"legendFormat": "",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Request Rate",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "reqps",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": "30s",
"schemaVersion": 27,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "Prometheus (k3s)",
"value": "Prometheus (k3s)"
},
"description": null,
"error": null,
"hide": 0,
"includeAll": false,
"label": "Datasource",
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"allValue": null,
"current": {},
"datasource": "$datasource",
"definition": "label_values(etcd_request_duration_seconds_sum{job=\"kubernetes-apiservers\"}, instance)",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": "Instance",
"multi": false,
"name": "instance",
"options": [],
"query": {
"query": "label_values(etcd_request_duration_seconds_sum{job=\"kubernetes-apiservers\"}, instance)",
"refId": "Prometheus (k3s)-instance-Variable-Query"
},
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {},
"datasource": "$datasource",
"definition": "label_values(etcd_request_duration_seconds_sum{job=\"kubernetes-apiservers\",instance=~\"$instance\"}, operation)",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": "Operation",
"multi": false,
"name": "operation",
"options": [],
"query": {
"query": "label_values(etcd_request_duration_seconds_sum{job=\"kubernetes-apiservers\",instance=~\"$instance\"}, operation)",
"refId": "Prometheus (k3s)-operation-Variable-Query"
},
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {},
"datasource": "$datasource",
"definition": "label_values(etcd_request_duration_seconds_sum{job=\"kubernetes-apiservers\",instance=~\"$instance\",operation=~\"$operation\"}, type)",
"description": null,
"error": null,
"hide": 0,
"includeAll": true,
"label": "Type",
"multi": false,
"name": "type",
"options": [],
"query": {
"query": "label_values(etcd_request_duration_seconds_sum{job=\"kubernetes-apiservers\",instance=~\"$instance\",operation=~\"$operation\"}, type)",
"refId": "Prometheus (k3s)-type-Variable-Query"
},
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-3h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "API Server etcd Performance",
"uid": "UeHfpemGz",
"version": 19
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment