How to get Azure Cognitive Search Quota and % usage?

Antonio Lisi 5 Reputation points
2023-05-31T14:16:44.38+00:00

As per the title, how can I see how many queries I already did in the month of all the available queries that I can make using the Cognitive search engine? I can see Storage, Indexes, ... but not the number of queries in the usage tab and in the Monitoring I can see just performance KPI.

Best regards,

Antonio

enter image description here

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
846 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,064 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. VasimTamboli 4,775 Reputation points
    2023-06-04T14:22:00.59+00:00

    Using the Azure portal:

    Go to the Azure portal (portal.azure.com) and navigate to your Cognitive Search resource.

    In the left-hand menu, under the "Settings" section, click on "Usage + quotas."

    On the "Usage + quotas" page, you will see the usage information for your Cognitive Search service, including the number of queries made in the current billing period.

    Using the Azure Management API:

    You can use the Azure Management API to programmatically retrieve the usage and quota information for your Cognitive Search service. Specifically, you can use the "ServiceStats" API to get this information. Here's an example using the Azure CLI:

    Install the Azure CLI and log in to your Azure account.

    1. Open a command prompt or terminal and run the following command to retrieve the service stats for your Cognitive Search resource:

    az rest --method GET --url "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/serviceStats?api-version=2020-08-01-Preview"

    Replace {subscriptionId}, {resourceGroupName}, and {searchServiceName} with the appropriate values for your Cognitive Search resource.

    The response will contain information about the usage and quota of your Cognitive Search service, including the number of queries made.

    Please note that the exact API endpoint and version may vary depending on your Azure Cognitive Search resource. You can refer to the Azure Management API documentation for more details on how to retrieve the service stats: Service - Get Stats

    I hope this helps! Let me know if you have any further questions.

    1 person found this answer helpful.
    0 comments No comments

  2. Grmacjon-MSFT 17,366 Reputation points
    2023-07-11T03:51:40.2666667+00:00

    Hi @Antonio Lisi

    Like Vasim mentioned in their response, you can get the quota and usage first.

    • To get the Azure Cognitive Search quota and usage, you can follow these steps:
    1. Navigate to your Azure Cognitive Search service in the Azure portal
    2. Click on "Usage + quotas" in the left-hand menu.
    3. Here you can see the current usage and quota for your service, including the number of documents indexed, the number of indexers running, and the number of queries made.
    • Next if you want to see how many queries you have made in the current month, you can use the Azure Monitor service.
    1. Navigate to your Azure Cognitive Search service in the Azure portal
    2. Click on "Monitoring" in the left-hand menu.
    3. Click on "Metrics" in the top menu.
    4. Select your search service and the "Search" category.
    5. Select the "Search Requests" metric.
    6. Set the time range to the current month.
    7. You can now see the number of search requests made in the current month.

    Check these Azure Cognitive Search documentation for more details:

    I hope this helps! Let me know if you have any further questions.

    -Grace

    0 comments No comments