Skip to content

Commit

Permalink
Fix the "Dropped Requests" panel of Kubernetes API Server Details
Browse files Browse the repository at this point in the history
This panel was not showing any data in different Kubernetes versions for 2
reasons:

- apiserver_dropped_requests_total was removed from the allowlist, see
  gardener#3502. This means that this panel was not showing any data in any
  Kubernetes version.

- apiserver_dropped_requests_total is deprecated in 1.24 and removed in
  1.25. So in Kubernetes clusters >= 1.25, this panel would have been empty
  for this reason as well.

The replacement metric `apiserver_request_terminations_total`, is already
allowlisted and available since Kubernetes v1.17, so we can simply use
that for a semantically similar query.

Co-authored-by: Istvan Zoltan Ballok <[email protected]>
Co-authored-by: Jeremy Rickards <[email protected]>
  • Loading branch information
istvanballok and rickardsjp committed Mar 17, 2023
1 parent 23918d1 commit 3d7742b
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -902,13 +902,17 @@
"hiddenSeries": false,
"id": 55,
"legend": {
"alignAsTable": true,
"avg": false,
"current": false,
"max": false,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"sort": "max",
"sortDesc": true,
"total": false,
"values": false
"values": true
},
"lines": true,
"linewidth": 1,
Expand All @@ -927,9 +931,11 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(rate(apiserver_dropped_requests_total[$rate])) by (requestKind)",
"legendFormat": "{{ requestKind }}",
"exemplar": true,
"expr": "sum(rate(apiserver_request_terminations_total{code=\"429\"}[$__rate_interval])) by (verb, group, version, resource, subresource)",
"hide": false,
"interval": "",
"legendFormat": "{{verb}} {{group}}/{{version}}/{{resource}} {{subresource}}",
"refId": "A"
}
],
Expand All @@ -939,7 +945,7 @@
"timeShift": null,
"title": "Dropped Requests",
"tooltip": {
"shared": true,
"shared": false,
"sort": 0,
"value_type": "individual"
},
Expand Down

0 comments on commit 3d7742b

Please sign in to comment.