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.
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]>
- Loading branch information
1 parent
237a55c
commit 23918d1
Showing
2 changed files
with
17 additions
and
9 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