Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
1,935 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am using the SDK to get a list of the resources used within the resource group (which works OK), but I then want to get a list of all the metrics for each resource and then down the values.
I am calling GetMetricNamespace() to return an Azure Pageable
I am not sure why but the question text keeps getting cut and so loosing all the real info, so here it is again.
I am using the SDK to get a list of the resources used within the resource group (which works OK), but I then want to get a list of all the metrics for each resource and then down the values.
I am calling GetMetricNamespace() to return an Azure Pageable<Monitor.Query.Models.MetricNamspace> passing in a string for the resource ID ="/subscriptions/<sub>/resourceGroups/<resourcegroupname>/providers/<Resource_provider>/<resource name>", but I get an error message that its not a valid Tenant or subscription.</sub>
I am using the same credentials that I use to get a list of the resources which is an Azure.Core.TokenCredtial obtained from an AzureAuth passing the tenant ID, Client ID and Client Secret.
What I ultimately want to do is get a list of all the possible metrics for each type of resource, then decide later which one's I will need to place within my code for monitoring, so that ultimately I will not be getting everything.
To get al the metrics and values should I be calling GetMetricNamespace() and then iterating over the values to then call QueryResosurce() to then iterate through the Metrics result to get the Time series elements?
Where is the best place to get the values to make up the resource ID used in the query?
Are there any examples with understandable values to see this working?