-
Notifications
You must be signed in to change notification settings - Fork 185
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
Conversation
rchikatw
commented
Oct 17, 2024
- Trigger alert when quota utilization reaches 80%
@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"}, |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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).
Signed-off-by: rchikatw <[email protected]>
There was a problem hiding this 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
@aruniiird: changing LGTM is restricted to collaborators In response to this:
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
[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 |
/hold |
/unhold |
/retest |
doing manual merge as prow seems to have glitched out on this PR. |