Skip to content

BUILD-345: Added csi shared resource metrics to telemetry#1477

Merged
openshift-merge-robot merged 1 commit into
openshift:masterfrom
alicerum:csi-shared-resource-metrics
Jan 6, 2022
Merged

BUILD-345: Added csi shared resource metrics to telemetry#1477
openshift-merge-robot merged 1 commit into
openshift:masterfrom
alicerum:csi-shared-resource-metrics

Conversation

@alicerum

@alicerum alicerum commented Nov 12, 2021

Copy link
Copy Markdown

We need to receive some new metrics from the telemetry, for CSI shared
resource driver and operator. Amount of shared resourced (secrets and
config maps) and amount of shares mapped to pods, both succeeded and
failed.

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

@openshift-ci openshift-ci Bot requested review from raptorsun and slashpai November 12, 2021 11:32
@alicerum

Copy link
Copy Markdown
Author

/assign @jan--f

@alicerum

Copy link
Copy Markdown
Author

/retest

@bwplotka bwplotka left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, just docs nits.

Comment thread Documentation/data-collection.md Outdated
#
# owners: (@openshift/team-build-api)
#
# openshift:openshift_csi_share_configmap_total:sum measures total amount of secrets shared by csi shared resource driver.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
# openshift:openshift_csi_share_configmap_total:sum measures total amount of secrets shared by csi shared resource driver.
# openshift_csi_share_secret_total measures total amount of secrets shared by csi shared resource driver.

#
# owners: (@openshift/team-build-api)
#
# openshift:openshift_csi_share_configmap_total:sum measures total amount of secrets shared by csi shared resource driver.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
# openshift:openshift_csi_share_configmap_total:sum measures total amount of secrets shared by csi shared resource driver.
# openshift_csi_share_secret_total measures total amount of secrets shared by csi shared resource driver.

Comment thread Documentation/data-collection.md Outdated
# owners: (@openshift/team-build-api)
#
# openshift:openshift_csi_share_configmap_total:sum measures total amount of config maps shared by csi shared resource driver.
- '{__name__="openshift_csi_share_configmap_total"}'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this looks like a gauge so it shouldn't have the _total suffix (reserved for counters). openshift_csi_shared_configmaps would be a better name.

@alicerum alicerum Nov 23, 2021

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

we actuall use total suffix for a bunch of other gauges. should i go back to the operator and change this metric name everywhere? this will require another pr and we weirdly don't have consistency here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ideally i'd recommend that you update all metrics and make them consistent with the instrumentation guidelines. Now I understand that it may not be possible for the project.

Comment thread Documentation/data-collection.md Outdated
#
# owners: (@openshift/team-build-api)
#
# openshift:openshift_csi_share_configmap_total:sum measures total amount of config maps shared by csi shared resource driver.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this doesn't match the metric name

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

i think i forgot to rebuild the docs. thanks!

Comment thread Documentation/data-collection.md Outdated
# owners: (@openshift/team-build-api)
#
# openshift:openshift_csi_share_mount_total:sum measures total amount of csi shared resources mounted in the pods.
- '{__name__="openshift_csi_share_mount_total"}'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

about this metric, it's usually better to track requests and failures in different counters (see https://promcon.io/2017-munich/slides/best-practices-and-beastly-pitfalls.pdf, page 10). For instance, openshift_csi_share_mount_requests_total and openshift_csi_share_mount_failures_total.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I don't see this recommendation to use different metrics instead of different labels in the slides. Slides do suggest that it's better to use failure_total and requests_total instead of failure_total and success_total though. Do you think we should go all the way back to already merged metrics and change them again?
@gabemontero wdyt?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Again i would recommend that you follow the recommendations. The idea of tracking requests and failures is that you can later alert on the percentage of operations failing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This was discussed on the PR introducing this and I recommended the label way of solving this.

Calculating error rates should still be quite convenient with this setup rate(openshift_csi_share_mount_failures_total{succeeded="false"}[5m]) / rate(openshift_csi_share_mount_failures_total[5m]), though admittedly not as short as following the best practice.

@alicerum Since I approved the current state, I'd be happy to propose the change in the exporter.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@jan--f After discussion with colleagues we decided it's better to go along with best practices, so i'm going to split them into total and failed series without labels. Thank you!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See openshift/csi-driver-shared-resource#78 if you prefer to go with @simonpasquier's recommendation.

Comment thread Documentation/data-collection.md Outdated
# owners: (@openshift/team-build-api)
#
# openshift:openshift_csi_share_configmap_total:sum measures total amount of secrets shared by csi shared resource driver.
- '{__name__="openshift_csi_share_secret_total"}'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ditto

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 23, 2021
@alicerum alicerum force-pushed the csi-shared-resource-metrics branch 2 times, most recently from bb908ed to cf52b18 Compare December 14, 2021 16:36
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 14, 2021
@alicerum alicerum force-pushed the csi-shared-resource-metrics branch from cf52b18 to 55dd2be Compare December 14, 2021 16:46
@alicerum

Copy link
Copy Markdown
Author

@jan--f please take a look at this, I've updated the metrics according to their new names and rebased the PR.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 18, 2021
@jan--f

jan--f commented Dec 20, 2021

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 20, 2021
We need to receive some new metrics from the telemetry, for CSI shared
resource driver and operator. Amount of shared resourced (secrets and
config maps) and amount of shares mapped to pods, both succeeded and
failed.
@alicerum alicerum force-pushed the csi-shared-resource-metrics branch from 55dd2be to becd444 Compare January 3, 2022 12:04
@openshift-ci openshift-ci Bot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 3, 2022
@alicerum

alicerum commented Jan 4, 2022

Copy link
Copy Markdown
Author

/retest

1 similar comment
@alicerum

alicerum commented Jan 4, 2022

Copy link
Copy Markdown
Author

/retest

@openshift-ci

openshift-ci Bot commented Jan 4, 2022

Copy link
Copy Markdown
Contributor

@alicerum: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-single-node becd444 link false /test e2e-aws-single-node

Full PR test history. Your PR dashboard.

Details

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.

@simonpasquier

Copy link
Copy Markdown
Contributor

/skip

@gabemontero

Copy link
Copy Markdown

/assign @prietyc123

for qe-approved label
I do no think there is a qe impact for you, as development and PM will be consuming telemetry for insight into future work. @adambkaplan of course chime in if you disagree.

/assign @rolfedh
for docs approved label .... looking at the existing docs, there is just a general description of what telemetry provides, with no discussion of what specific components are enabled, so there should be no docs impact for this

/label px-approved

@openshift-ci openshift-ci Bot added the px-approved Signifies that Product Support has signed off on this PR label Jan 5, 2022
@gabemontero

Copy link
Copy Markdown

@simonpasquier @jan--f @bwplotka given your prior efforts reviewing this, I'm inclined to let one of you do the LGTM, but if you all are otherwise too busy, I think @alicerum has pulled in you comments, and I can do it.

thanks

@rolfedh

rolfedh commented Jan 5, 2022

Copy link
Copy Markdown

/label docs-approved

@prietyc123

Copy link
Copy Markdown

/label qe-approved

@openshift-ci openshift-ci Bot added the qe-approved Signifies that QE has signed off on this PR label Jan 6, 2022
@jan--f

jan--f commented Jan 6, 2022

Copy link
Copy Markdown
Contributor

Thanks, this looks great!
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 6, 2022
@openshift-ci

openshift-ci Bot commented Jan 6, 2022

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

Details 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

@gabemontero

Copy link
Copy Markdown

/label docs-approved

@openshift-ci openshift-ci Bot added the docs-approved Signifies that Docs has signed off on this PR label Jan 6, 2022
@openshift-merge-robot openshift-merge-robot merged commit 375ec36 into openshift:master Jan 6, 2022
wking added a commit to wking/cluster-version-operator that referenced this pull request Mar 23, 2022
Fleet capability choices should make their way up to Red Hat via
Insights uploads.  But some clusters have Telemetry enabled but
Insights disabled [1].  For these clusters, we'll want this data in
Telemetry, and getting it into metrics (this commit) is the first
step.  After this lands, we'll need to update the monitoring operator
like [2] to get these shipped up off of cluster.

[1]: openshift/enhancements#922 (comment)
[2]: openshift/cluster-monitoring-operator#1477
wking added a commit to wking/cluster-version-operator that referenced this pull request Mar 23, 2022
Fleet capability choices should make their way up to Red Hat via
Insights uploads.  But some clusters have Telemetry enabled but
Insights disabled [1].  For these clusters, we'll want this data in
Telemetry, and getting it into metrics (this commit) is the first
step.  After this lands, we'll need to update the monitoring operator
like [2] to get these shipped up off of cluster.

[1]: openshift/enhancements#922 (comment)
[2]: openshift/cluster-monitoring-operator#1477
wking added a commit to wking/cluster-version-operator that referenced this pull request Mar 23, 2022
Fleet capability choices should make their way up to Red Hat via
Insights uploads.  But some clusters have Telemetry enabled but
Insights disabled [1].  For these clusters, we'll want this data in
Telemetry, and getting it into metrics (this commit) is the first
step.  After this lands, we'll need to update the monitoring operator
like [2] to get these shipped up off of cluster.

[1]: openshift/enhancements#922 (comment)
[2]: openshift/cluster-monitoring-operator#1477
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. docs-approved Signifies that Docs has signed off on this PR lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants