Hello GGGorast
To get the total monthly cost for two separate VMs in Azure and the cost separated for each VM, you can follow these steps:
Log in to the Azure portal using your credentials.
- In the left-hand menu, click on "Cost Management + Billing."
- Select "Cost analysis" from the menu.
- In the "Scope" section, select the subscription where your VMs are located.
- In the "Time range" section, select the month for which you want to get the cost.
- In the "Group by" section, select "Resource" and then "Name."
- In the "Filters" section, click on "Add filter" and select "Resource group" from the dropdown list.
- Select the resource group that contains the two VMs.
- You should now see a table with the cost for each resource, including the two VMs.
- To view the cost for each VM separately, you can click on the "Name" column header to sort the table by resource name. You will then be able to see the cost for each VM in separate rows.
Alternatively, you can use Azure's Cost Management APIs to programmatically retrieve the cost data for your VMs and process it in your preferred way.
Please don’t forget to Accept Answer
and Yes
for "was this answer helpful" wherever the information provided helps you, this can be beneficial to other community members.