Regarding Cost field in azure REST API metrics query response.

Adhiraj George Shaji 1 Reputation point
2021-12-07T17:11:26.43+00:00

While querying azure monitor metrics the response has a Cost field as shown in link list

But the Unit/Currency of this field is not mentioned. Kindly help understand the unit for this.

Request:

GET https://management.azure.com/subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo/providers/Microsoft.Insights/metrics?timespan=2021-06-07T21:51:00Z/2021-06-08T01:51:00Z&interval=FULL&metricnames=MongoRequestsCount,MongoRequests&aggregation=average&api-version=2018-01-01&metricnamespace=microsoft.documentdb/databaseaccounts  

Response:
{
"cost": 239,
"timespan": "2021-06-07T21:51:00Z/2021-06-08T01:51:00Z",
"interval": "PT4H",
"value": [
.......

RESPONSE
Name Type Description
cost number The integer value representing the relative cost of the query.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,651 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 18,506 Reputation points
    2021-12-08T04:42:04.713+00:00

    Hi @Adhiraj George Shaji ,

    Welcome to Microsoft Q&A! Thanks for posting the question.

    The "cost" returned in the mentioned sample response corresponds to the integer value representing the relative cost (computational) of the query. This is computed based on the CPU, IO, and memory required for the query. To get details of Cost (monetary) and Usage, please use the Azure Cost Management API.

    Please let me know if you have any questions.

    ---
    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.