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

exporter: add alert for storagequotautilizationration > 0.8 #2861

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

rchikatw
Copy link
Contributor

  • Trigger alert when quota utilization reaches 80%

@rchikatw
Copy link
Contributor Author

@leelavg can i get review on this.

StorageQuotaUtilizationRatio: prometheus.NewDesc(
prometheus.BuildFQName("ocs", "storage_client", "storage_quota_utilization_ratio"),
`StorageQuotaUtilizationRatio of ODF Storage Client`,
[]string{"odf_client_name"},
Copy link
Contributor

Choose a reason for hiding this comment

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

from line#151, we understand that the odf_client_name label is populated by concatenating client_name and cluster_name. Question is why not we add two individual labels (something like "client_name" and "client_cluster_name") and populate them separately? (a multiple label example can be seen here with StorageConsumerMetadata description)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no specific reason for using multiple labels instead of using a single label. Do you suggest not to use concat?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, nothing restricting us to add one single label concatenating multiple values (from other labels), if you prefer that way it is perfectly fine. Raised this question, because we have the option to add multiple labels individually and their combination determines the uniqueness (so why restrict our self by using a single label) (=

Another plus point (of using multiple labels) is about ease of understanding. For example,
if you have three labels like namespace, cluster-name and host-name, it is much easier to understand the metric object with these three distinct labels, rather than adding a single label with all the values concatenated.

Above example with separate labels

Name                  namespace            host             clustername                 Value
metric-abc             my-ns           10.9.31.109         my_cluster_1                    1

Same example with concatenated metric label

Name                      my_unique_label                         Value
metric-abc          my_cluster_1_my-ns_10.9.31.109                  1

As a general thumb-rule, prefer the concatenated values if we are creating a new label by combining some internal values (which is not exposed to the user/admin), but try to create separate labels if the given labels are known ones (like namespace, cluster-name etc).

Copy link
Contributor

@aruniiird aruniiird left a comment

Choose a reason for hiding this comment

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

Thanks for the changes.
LGTM

Copy link
Contributor

openshift-ci bot commented Nov 11, 2024

@aruniiird: changing LGTM is restricted to collaborators

In response to this:

Thanks for the changes.
LGTM

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-sigs/prow repository.

Copy link
Contributor

@umangachapagain umangachapagain left a comment

Choose a reason for hiding this comment

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

lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 11, 2024
Copy link
Contributor

openshift-ci bot commented Nov 11, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aruniiird, rchikatw, umangachapagain

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 11, 2024
@malayparida2000
Copy link
Contributor

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 11, 2024
@malayparida2000
Copy link
Contributor

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 11, 2024
@malayparida2000
Copy link
Contributor

/retest

@malayparida2000 malayparida2000 merged commit bce1aa2 into red-hat-storage:main Nov 11, 2024
10 of 11 checks passed
@malayparida2000
Copy link
Contributor

doing manual merge as prow seems to have glitched out on this PR.

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