Bug 1997528 - instance:etcd_object_counts:sum and cluster:usage:resources:sum use the etcd_object_counts metric which is deprecated
Summary: instance:etcd_object_counts:sum and cluster:usage:resources:sum use the etcd_...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.9
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.9.0
Assignee: Simon Pasquier
QA Contact: Junqi Zhao
Depends On:
TreeView+ depends on / blocked
Reported: 2021-08-25 12:51 UTC by Simon Pasquier
Modified: 2021-10-18 17:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-10-18 17:49:05 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift cluster-monitoring-operator pull 1345 0 None None None 2021-08-25 12:57:31 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:49:19 UTC

Description Simon Pasquier 2021-08-25 12:51:46 UTC
Description of problem:
CMO ships 2 recording rules (instance:etcd_object_counts:sum and cluster:usage:resources:sum) which use the etcd_object_counts metric which is deprecated since Kube v1.21 [1].

[1] https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.21.md

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Check the definition of instance:etcd_object_counts:sum and cluster:usage:resources:sum

Actual results:
They use etcd_object_counts.

Expected results:
They don't use deprecated metrics.

Additional info:
etcd_object_counts is replaced by apiserver_storage_objects which has the same labels and semantics.

Comment 4 Junqi Zhao 2021-08-27 06:24:27 UTC
tested with 4.9.0-0.nightly-2021-08-26-164418, etcd_object_counts is replaced by apiserver_storage_objects
# oc -n openshift-monitoring get cm prometheus-k8s-rulefiles-0 -oyaml | grep -E "instance:etcd_object_counts:sum|cluster:usage:resources:sum" -C1
      - expr: sum by (instance) (apiserver_storage_objects)
        record: instance:etcd_object_counts:sum
      - expr: topk(500, max by(resource) (apiserver_storage_objects))
        record: cluster:usage:resources:sum

Comment 11 errata-xmlrpc 2021-10-18 17:49:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.