How to get exact monthly cost for speciic mounted Virtual machine?

GGGorast 25 Reputation points
2023-04-04T08:15:17.3266667+00:00

Hi, I need to get total monthly cost for two separate VMs that my company have online.
How can I get the cost separate for every VM we have? Thanks,
G

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,075 questions
Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
3,642 questions
0 comments No comments
{count} votes

Accepted answer
  1. Tech-Hyd-1989 5,816 Reputation points
    2023-04-04T08:23:35.5166667+00:00

    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.

    1 person found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Tech-Hyd-1989 5,816 Reputation points
    2023-04-04T08:30:15.5833333+00:00

    Hi GGGorast,

    Are you able to see the answer now? If not, I am posting it again 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.

    2 people found this answer helpful.

  2. GGGorast 25 Reputation points
    2023-04-04T08:38:22.3766667+00:00

    Duplicate comment deleted

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.