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

OBSDOCS-850: update CLI commands to access metrics outside the cluster for UWM #72176

Conversation

bburt-rh
Copy link
Contributor

@bburt-rh bburt-rh commented Feb 27, 2024

Version(s): 4.12+

Issue: https://issues.redhat.com/browse/OBSDOCS-850

Link to docs preview: https://72176--ocpdocs-pr.netlify.app/openshift-enterprise/latest/monitoring/enabling-monitoring-for-user-defined-projects#accessing-metrics-from-outside-cluster_enabling-monitoring-for-user-defined-projects

QE review:

  • QE has approved this change.

Additional information:
This PR updates CLI commands for accessing metrics outside the cluster for user workload monitoring because the old commands no longer work in OCP 4.15+.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 27, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 27, 2024

@bburt-rh: This pull request references OBSDOCS-850 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.16.0" version, but no target version was set.

In response to this:

Version(s): 4.15+

Issue: https://issues.redhat.com/browse/OBSDOCS-850

Link to docs preview:

QE review:

  • QE has approved this change.

Additional information:
This PR updates CLI commands for accessing metrics outside the cluster for user workload monitoring because these commands no longer work in OCP 4.15+.

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.

@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 27, 2024
@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Feb 27, 2024

🤖 Fri Mar 01 15:41:15 - Prow CI generated the docs preview:
https://72176--ocpdocs-pr.netlify.app

@openshift-ci-robot
Copy link

openshift-ci-robot commented Feb 27, 2024

@bburt-rh: This pull request references OBSDOCS-850 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.16.0" version, but no target version was set.

In response to this:

Version(s): 4.15+

Issue: https://issues.redhat.com/browse/OBSDOCS-850

Link to docs preview: https://72176--ocpdocs-pr.netlify.app/openshift-enterprise/latest/monitoring/enabling-monitoring-for-user-defined-projects#accessing-metrics-from-outside-cluster_enabling-monitoring-for-user-defined-projects

QE review:

  • QE has approved this change.

Additional information:
This PR updates CLI commands for accessing metrics outside the cluster for user workload monitoring because these commands no longer work in OCP 4.15+.

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.

@bburt-rh bburt-rh force-pushed the OBSDOCS-850-update-CLI-command-to-access-metrics-outside-the-cluster branch from b977fb9 to 2a67b9d Compare February 27, 2024 19:57
@bburt-rh
Copy link
Contributor Author

@simonpasquier - Can you PTAL and add comments/feedback on my changes? Thanks!

modules/accessing-metrics-outside-cluster.adoc Outdated Show resolved Hide resolved
modules/accessing-metrics-outside-cluster.adoc Outdated Show resolved Hide resolved
modules/accessing-metrics-outside-cluster.adoc Outdated Show resolved Hide resolved
modules/accessing-metrics-outside-cluster.adoc Outdated Show resolved Hide resolved
@bburt-rh bburt-rh force-pushed the OBSDOCS-850-update-CLI-command-to-access-metrics-outside-the-cluster branch from 2a67b9d to 79e8ee1 Compare February 28, 2024 20:05
@bburt-rh bburt-rh force-pushed the OBSDOCS-850-update-CLI-command-to-access-metrics-outside-the-cluster branch from 79e8ee1 to 4171381 Compare February 29, 2024 20:45
@bburt-rh bburt-rh requested a review from juzhao February 29, 2024 20:51
@bburt-rh bburt-rh force-pushed the OBSDOCS-850-update-CLI-command-to-access-metrics-outside-the-cluster branch 3 times, most recently from 04c054c to 5cb6cd7 Compare February 29, 2024 21:24
@juzhao
Copy link

juzhao commented Mar 1, 2024

tested like below, the doc is LGTM
/lgtm

grant permission to user to get thanos-querier API route
$ oc adm policy add-cluster-role-to-user cluster-monitoring-operator-namespaced testuser-12
clusterrole.rbac.authorization.k8s.io/cluster-monitoring-operator-namespaced added: "testuser-12"

grant permission to user to access thanos-querier API
$ oc adm policy add-cluster-role-to-user cluster-monitoring-view testuser-12
clusterrole.rbac.authorization.k8s.io/cluster-monitoring-view added: "testuser-12"

# HOST=$(oc -n openshift-monitoring get route thanos-querier -ojsonpath={.spec.host})
# TOKEN=$(oc whoami -t)
# NAMESPACE=ns1
# curl -H "Authorization: Bearer $TOKEN" -k "https://$HOST/api/v1/query?" --data-urlencode "query=up{namespace='$NAMESPACE'}"
{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"up","endpoint":"web","instance":"10.130.8.29:8080","job":"prometheus-example-app","namespace":"ns1","pod":"prometheus-example-app-6bdcfb7c76-llmhg","prometheus":"openshift-user-workload-monitoring/user-workload","service":"prometheus-example-app"},"value":[1709274323.352,"1"]}]}}

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

@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.

/lgtm

@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 1, 2024

@bburt-rh: This pull request references OBSDOCS-850 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.16.0" version, but no target version was set.

In response to this:

Version(s): 4.15+

Issue: https://issues.redhat.com/browse/OBSDOCS-850

Link to docs preview: https://72176--ocpdocs-pr.netlify.app/openshift-enterprise/latest/monitoring/enabling-monitoring-for-user-defined-projects#accessing-metrics-from-outside-cluster_enabling-monitoring-for-user-defined-projects

QE review:

  • QE has approved this change.

Additional information:
This PR updates CLI commands for accessing metrics outside the cluster for user workload monitoring because these commands no longer work in OCP 4.15+.

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.

@bburt-rh bburt-rh added peer-review-needed Signifies that the peer review team needs to review this PR branch/enterprise-4.15 branch/enterprise-4.16 labels Mar 1, 2024
@bburt-rh bburt-rh added this to the Continuous Release milestone Mar 1, 2024
@openshift-ci-robot
Copy link

openshift-ci-robot commented Mar 1, 2024

@bburt-rh: This pull request references OBSDOCS-850 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.16.0" version, but no target version was set.

In response to this:

Version(s): 4.15+

Issue: https://issues.redhat.com/browse/OBSDOCS-850

Link to docs preview: https://72176--ocpdocs-pr.netlify.app/openshift-enterprise/latest/monitoring/enabling-monitoring-for-user-defined-projects#accessing-metrics-from-outside-cluster_enabling-monitoring-for-user-defined-projects

QE review:

  • QE has approved this change.

Additional information:
This PR updates CLI commands for accessing metrics outside the cluster for user workload monitoring because the old commands no longer work in OCP 4.15+.

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.

Copy link
Contributor

@mletalie mletalie left a comment

Choose a reason for hiding this comment

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

/label peer-review-in-progress

Copy link

@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.

/lgtm

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

@mletalie mletalie left a comment

Choose a reason for hiding this comment

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

/remove-label peer-review-in-progress
/remove-label peer-review-needed
/label peer-review-done
/lgtm

modules/accessing-metrics-outside-cluster.adoc Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot added peer-review-done Signifies that the peer review team has reviewed this PR and removed peer-review-in-progress Signifies that the peer review team is reviewing this PR peer-review-needed Signifies that the peer review team needs to review this PR labels Mar 1, 2024
@mletalie
Copy link
Contributor

mletalie commented Mar 1, 2024

Good job, @bburt-rh. Just had one comment/observation.
LGTM!

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 1, 2024
@bburt-rh bburt-rh force-pushed the OBSDOCS-850-update-CLI-command-to-access-metrics-outside-the-cluster branch from 442e216 to 61599bb Compare March 1, 2024 15:35
Copy link

openshift-ci bot commented Mar 1, 2024

New changes are detected. LGTM label has been removed.

Copy link

openshift-ci bot commented Mar 1, 2024

@bburt-rh: 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.

@bburt-rh bburt-rh merged commit 6e7f92f into openshift:main Mar 1, 2024
2 checks passed
@bburt-rh
Copy link
Contributor Author

bburt-rh commented Mar 1, 2024

/cherrypick enterprise-4.12

@bburt-rh
Copy link
Contributor Author

bburt-rh commented Mar 1, 2024

/cherrypick enterprise-4.13

@bburt-rh
Copy link
Contributor Author

bburt-rh commented Mar 1, 2024

/cherrypick enterprise-4.14

@bburt-rh
Copy link
Contributor Author

bburt-rh commented Mar 1, 2024

/cherrypick enterprise-4.15

@openshift-cherrypick-robot

@bburt-rh: new pull request created: #72462

In response to this:

/cherrypick enterprise-4.12

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.

@openshift-cherrypick-robot

@bburt-rh: new pull request created: #72463

In response to this:

/cherrypick enterprise-4.13

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.

@openshift-cherrypick-robot

@bburt-rh: new pull request created: #72464

In response to this:

/cherrypick enterprise-4.14

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.

@openshift-cherrypick-robot

@bburt-rh: new pull request created: #72465

In response to this:

/cherrypick enterprise-4.15

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.

@bburt-rh
Copy link
Contributor Author

bburt-rh commented Mar 1, 2024

/cherrypick enterprise-4.16

@openshift-cherrypick-robot

@bburt-rh: new pull request created: #72466

In response to this:

/cherrypick enterprise-4.16

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/enterprise-4.12 branch/enterprise-4.13 branch/enterprise-4.14 branch/enterprise-4.15 branch/enterprise-4.16 jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. peer-review-done Signifies that the peer review team has reviewed this PR qe-approved Signifies that QE has signed off on this PR size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants