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

MON-3940: Add the collection of MTV migration metrics to Telemetry #2461

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bkhizgiy
Copy link

Following this JIRA issue https://issues.redhat.com/browse/MON-3940

Related to this PRs for adding metrics on the MTV side:
kubev2v/forklift#916
kubev2v/forklift#932
kubev2v/forklift#978

Following this Jira issue https://issues.redhat.com/browse/MON-3940

Signed-off-by: Bella Khizgiyaev <bkhizgiy@redhat.com>
Copy link
Contributor

openshift-ci bot commented Sep 10, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bkhizgiy
Once this PR has been reviewed and has the lgtm label, please assign simonpasquier for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@fabiand
Copy link

fabiand commented Sep 10, 2024

@simonpasquier please review

Copy link
Contributor

openshift-ci bot commented Sep 10, 2024

@bkhizgiy: The following tests 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-ovn-single-node ddd0170 link false /test e2e-aws-ovn-single-node
ci/prow/e2e-aws-ovn-techpreview ddd0170 link true /test e2e-aws-ovn-techpreview

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-sigs/prow repository. I understand the commands that are listed here.

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

You'd need to configure recording rules aggregating on the allowed labels:

  • status
  • provider
  • mode
  • target

If the metrics are emitted by a single container then you can do:

record: cluster:mtv_migrations_status_total:max
expr: max by(status, provider, mode, target) (mtv_migrations_status_total)

otherwise you should probably sum

record: cluster:mtv_migrations_status_total:sum
expr: sum by(status, provider, mode, target) (mtv_migrations_status_total)

@simonpasquier
Copy link
Contributor

simonpasquier commented Sep 10, 2024

/retitle MON-3940: Add the collection of MTV migration metrics to Telemetry
/hold

until explicit approval

@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 Sep 10, 2024
@openshift-ci openshift-ci bot changed the title Add the collection of MTV migration metrics to Telemetry MON-3940: Add the collection of MTV migration metrics to Telemetry Sep 10, 2024
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 10, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 10, 2024

@bkhizgiy: This pull request references MON-3940 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.18.0" version, but no target version was set.

In response to this:

Following this JIRA issue https://issues.redhat.com/browse/MON-3940

Related to this PRs for adding metrics on the MTV side:
kubev2v/forklift#916
kubev2v/forklift#932
kubev2v/forklift#978

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 openshift-eng/jira-lifecycle-plugin repository.

@bkhizgiy
Copy link
Author

@simonpasquier Thanks for the review. Should the recording rule be part of the MTV code, or can we specify the expression in the whitelist? This metric consists only of the mentioned fields, so there aren't any labels to remove or modify.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 14, 2024
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

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.

@fabiand
Copy link

fabiand commented Sep 19, 2024

@simonpasquier any update?

@simonpasquier
Copy link
Contributor

Should the recording rule be part of the MTV code, or can we specify the expression in the whitelist?

MTV code. The telemetry allow-list only references metric names (and labels).

This metric consists only of the mentioned fields, so there aren't any labels to remove or modify.

We still ask to remove the labels that are useless to keep at the Telemetry server level like instance and pod.

#
# cluster:mtv_migrations_status_total is the total number of VM migrations running on the cluster,
# labeled with {status}, {provider}, {mode}, and {target}.
- '{__name__="mtv_migrations_status_total"}'
Copy link
Contributor

@juzhao juzhao Sep 25, 2024

Choose a reason for hiding this comment

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

the metrics name mtv_migrations_status_total is not the same as cluster:mtv_migrations_status_total in the annotation
cluster:mtv_migrations_status_total is the total number of VM migrations running on the cluster,
maybe should be cluster:mtv_migrations_status_total:sum as @simonpasquier mentioned in #2461 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants