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

Unclear where I can find the format of "resourceUri" #17310

Closed
acomito opened this issue Aug 27, 2021 · 4 comments
Closed

Unclear where I can find the format of "resourceUri" #17310

acomito opened this issue Aug 27, 2021 · 4 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor Monitor, Monitor Ingestion, Monitor Query needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@acomito
Copy link

acomito commented Aug 27, 2021

I'm using queryMetrics from @azure/monitor-query and I'm not clear where I can find the format of resourceUri?

In my case, I'm trying to get metrics for a virtual machine.

Can I infer it from the portal URL?

/resource/subscriptions/12345b76-ad3e-4b92-9b7c-5bd3738d137d/resourceGroups/region_name/providers/Microsoft.Compute/virtualMachines

I saw an issue earlier about this: #16124

Also I initialize/authenticate using credentials tied to a subscription, seems weird I have to then pass in the subscription to the Uri again

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Aug 27, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 27, 2021
@ramya-rao-a ramya-rao-a added Client This issue points to a problem in the data-plane of the library. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Aug 27, 2021
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 27, 2021
@KarishmaGhiya
Copy link
Member

KarishmaGhiya commented Aug 31, 2021

@acomito
We have the information to find the resource URI in the Readme - https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/monitor/monitor-query#query-metrics
The resource URI must be that of the resource for which metrics are being queried. It's normally of the format /subscriptions//resourceGroups//providers//topics/.

The resource URI must be that of the resource for which metrics are being queried. It's normally of the format /subscriptions/<id>/resourceGroups/<rg-name>/providers/<source>/topics/<resource-name>.

To find the resource URI:

  1. Navigate to your resource's page in the Azure portal.
  2. From the Overview blade, select the JSON View link.
  3. In the resulting JSON, copy the value of the id property.

Let us know if this was not discoverable, so we can highlight this in the terms section too.

@KarishmaGhiya
Copy link
Member

@acomito I initialize/authenticate using credentials tied to a subscription, seems weird I have to then pass in the subscription to the Uri again - Can you share what code you used for authentication? The authentication code doesn't require you to pass any resource information. The resource URI is for the resource you want to query the metrics and you pass it in while querying the metrics.

@KarishmaGhiya
Copy link
Member

KarishmaGhiya commented Sep 10, 2021

Hi @acomito We have the instructions in the README file for the questions you were asking. Let us know if you have more questions. Thanks!

@KarishmaGhiya KarishmaGhiya reopened this Sep 10, 2021
@KarishmaGhiya KarishmaGhiya added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Sep 10, 2021
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Sep 17, 2021
@ghost
Copy link

ghost commented Sep 17, 2021

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@ghost ghost closed this as completed Oct 1, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
@scottaddie scottaddie added Monitor Monitor, Monitor Ingestion, Monitor Query and removed Monitor - Query labels Sep 28, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor Monitor, Monitor Ingestion, Monitor Query needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

5 participants