question

MohanAnoop-7126 avatar image
0 Votes"
MohanAnoop-7126 asked MohanAnoop-7126 commented

Is there any way to differentiate Virtual Machine and Virtual Machine ScaleSets metrics?

Hi,

I am using an exporter to expose the Azure Monitor metrics for VM and VM ScaleSet. When I checked the metrics in exporter endpoint, I couldn't see any specific labels related to VM or VM ScaleSets. Is there anyway to differentiate them in the metrics?

Sample 'Percentage CPU' metrics for VM and VM ScaleSets are given below:

VM Metrics:
percentage_cpu_percent_average{container="azure-exporter", endpoint="http-metrics", instance="XXX.XXX.XXX.XX:9276", job="azure-exporter", namespace="monitoring", pod="azure-exporter-6cf86ccd5c-2wjn4", resource_group="testgroup", resource_name="gitlab-runner-flatcar", service="azure-exporter"}

VM ScaleSet Metrics:
percentage_cpu_percent_average{container="azure-exporter", endpoint="http-metrics", instance="XXX.XXX.XXX.XX:9276", job="azure-exporter", namespace="monitoring", pod="azure-exporter-6cf86ccd5c-2wjn4", resource_group="testgroup", resource_name="clm-abc-def-wu2-test-pool", service="azure-exporter"}

Thank You

azure-monitor
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MohanAnoop-7126, thank you for reaching out to us. Can you tell me which exporter are you using? So, in case of Azure Event Hubs, you will see a unique resource ID in the records, for Azure Storage, the blob container name will be based on Resource name, etc. Also, I see that you can divide the provided metrics based on resource_name. Let me know if you are looking for something else.



0 Votes 0 ·

TThank you @85446611 for checking this issue.

I am using https://github.com/RobustPerception/azure_metrics_exporter to collect metrics from monitor. I have set up a prometheus to scrape metrics from the exporter endpoint.
Yes, I can divide the provided metrics based on resource_name. However, my requirements to display separate Grafana dashboards to display VM and VM ScaleSets. In this case, I think I have to manually provide the values for resource_name label in the query to display the VM and VM ScaleSets separately. Is there any other way to handle it?

Another question is, I could see a single metrics for the VM ScaleSets. That means, we can't see the metrics for each instances under the VM ScaleSets separately?

0 Votes 0 ·

@MohanAnoop-7126 I haven't tested out the azure_metrics_exporter , but I think you can segregate the metrics based on the resource type as noted in the mentioned link.

120530-image.png

In order to view the metrics of each virtual machine, you can apply splitting which is feature of Azure Metrics. For more information, refer this document.


0 Votes 0 ·
image.png (5.4 KiB)

Thanks @SwathiDhanwada-MSFT for checking it.

I can see the resource_name in all metrics. However the label "resource_type" is not available in any metrics. I believe, the azure metrics exporter does not have any dependency with metric labels.

Regarding the "Metric splitting" - I believe this is for splitting the metrics by dimension. My requirement is actually to see the metrics of the VMs that are attached to a VM ScaleSet.

For eg:
If I created a VM ScaleSet with name "test-scaleset-internal" and if there are two backend instances with names "test-scaleset-internal-vm-1" and "test-scaleset-internal-vm-2", then I would like to see the metrics of the VMs ("test-scaleset-internal-vm-1" and "test-scaleset-internal-vm-2").

I tried https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported#microsoftcomputevirtualmachinescalesetsvirtualmachines
But, I do not get any metrics from this.

Thank You

0 Votes 0 ·

0 Answers