forked from gardener/gardener
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance API server monitoring (gardener#7639)
* Add API server metrics to allowlist Gardener currently supports Kubernetes v1.20 to v1.25. In Kubernetes v1.23, `apiserver_registered_watchers` is deprecated in favor of `apiserver_longrunning_requests`. It is hidden in v1.24. This commit adds the new metric, `apiserver_longrunning_requests` to the allowlist. Co-authored-by: Istvan Zoltan Ballok <[email protected]> Co-authored-by: Jeremy Rickards <[email protected]> * Adjust the promql query to support all the K8s versions The promql expression: sum by (group, version, kind) (apiserver_registered_watchers) + on () group_left () absent(apiserver_longrunning_requests) * 0 or sum by (group, version, resource) (apiserver_longrunning_requests) returns the result of the newer metric `apiserver_longrunning_requests` (>=1.23) if present, otherwise it will return the `apiserver_registered_watchers` (<1.23). Note that the "total" query used the "count" aggregation which was semantically not meaningful. This aspect is also fixed in this commit: the registered watchers / long running requests need to be added up to get the total value. Co-authored-by: Istvan Zoltan Ballok <[email protected]> Co-authored-by: Jeremy Rickards <[email protected]> * Fix the "Dropped Requests" panel of Kubernetes API Server Details 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]> --------- Co-authored-by: Istvan Zoltan Ballok <[email protected]>
- Loading branch information
Showing
5 changed files
with
31 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters