Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCO-371: metrics: aggregate os_image_url_override metric to avoid unbounded cardinality #3363

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

sinnykumari
Copy link
Contributor

@openshift-ci openshift-ci bot requested a review from yuqi-zhang October 4, 2022 13:07
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 4, 2022
@sinnykumari
Copy link
Contributor Author

sinnykumari commented Oct 4, 2022

From a local cluster, aggregated data looks fine when both master and worker pool has overridedn osImageURL. See screenshot

@cgwalters PTAL, does this look good to go?

@cgwalters
Copy link
Member

I'll be honest, I don't know the Prometheus stuff very well. Something that wasn't clear to me was why we don't have labels/annotations/warning stuff, but I guess that's because it's not an alert?

One question here - I imagine we'll want to display something about this in the GUI console - do we expect them to trigger off this metric for example?

@jkyros
Copy link
Contributor

jkyros commented Oct 4, 2022

Yeah, the other stuff that was in there was for alerting. There are different "types" of rules, it just so happens that the other rules that are there for the MCC are for the paused pool alert and not recording rules.

I personally like that we're doing the aggregation of the pool metrics at the "rules level" rather than emitting a separate metric from the MCC, but what do I know 😄

@@ -33,6 +33,10 @@ spec:
summary: "Paused machine configuration pool '{{$labels.pool}}' is blocking a necessary certificate rotation and must be unpaused before the current kube-apiserver-to-kubelet-signer certificate expires in {{ $value | humanizeDuration }}."
description: "Machine config pools have a 'pause' feature, which allows config to be rendered, but prevents it from being rolled out to the nodes. This alert indicates that a certificate rotation has taken place, and the new kubelet-ca certificate bundle has been rendered into a machine config, but because the pool '{{$labels.pool}}' is paused, the config cannot be rolled out to the nodes in that pool. You will notice almost immediately that for nodes in pool '{{$labels.pool}}', pod logs will not be visible in the console and interactive commands (oc log, oc exec, oc debug, oc attach) will not work. You must unpause machine config pool '{{$labels.pool}}' to let the certificates through before the kube-apiserver-to-kubelet-signer certificate expires. You have approximately {{ $value | humanizeDuration }} remaining before this happens and nodes in '{{$labels.pool}}' cease to function properly."
runbook_url: https://github.com/openshift/blob/master/alerts/machine-config-operator/MachineConfigControllerPausedPoolKubeletCA.md
- name: os-image-override.rules
Copy link
Contributor

@jkyros jkyros Oct 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our "standards" for prometheus metrics/rules have changed over time.

  • is this name.rules naming for the group a convention we should be following for future rules (or just recording rules?)
  • do we need to worry about retrofitting?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our "standards" for prometheus metrics/rules have changed over time.

The rules for the rules

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not aware of if this is a rule or not. I picked this convention from existing rules that I came across in CMO e.g. https://github.com/openshift/cluster-monitoring-operator/blob/master/assets/cluster-monitoring-operator/prometheus-rule.yaml#L14 . I know CMO team is working on a doc, so we may get better idea of best practices once available.

@sinnykumari
Copy link
Contributor Author

I'll be honest, I don't know the Prometheus stuff very well. Something that wasn't clear to me was why we don't have labels/annotations/warning stuff, but I guess that's because it's not an alert?

+1 on what John said. Also, have found https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules helpful to understand difference between recording and alerting rules.

One question here - I imagine we'll want to display something about this in the GUI console - do we expect them to trigger off this metric for example?

For console based on what we would want to show, we can use alerting with severty:info for existing os_image_url_override metric or something more meaningful.

@sinnykumari
Copy link
Contributor Author

@simonpasquier @jan--f can I get a review and lgtm from one of you :) This is follow-up from openshift/cluster-monitoring-operator#1784

@jan--f
Copy link

jan--f commented Oct 5, 2022

👍
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 5, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 5, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jan--f, sinnykumari

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@sinnykumari
Copy link
Contributor Author

/test e2e-aws

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 5, 2022

@sinnykumari: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants