Question on Maximum records returned by log query (30000)

kumar kaushal 176 Reputation points Microsoft Employee
2021-06-21T14:11:21.507+00:00

We have a subscription which comprise of 430 VM's. Making use of Inventory and change tracking feature of automation account. The Software piece that is listed under inventory has almost 33K entries . Now when we run the query :

ConfigurationData
| where ConfigDataType == "Software"
| order by TimeGenerated desc

We are only able to see 30000 entries and when we export in CSV Filter with Computer name , we see that we have results for only for some 45 machines for last 24 hours. If we increase the selection to last 7 days we get like 65 machines but the record still see 30000 entries .

I think we are hitting the limitation listed below , Is their a way we can get a list for all 430 VM's ?

https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits

Azure portal

Category Limit Comments
Maximum records returned by a log query 30,000 Reduce results using query scope, time range, and filters in 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.
3,645 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,996 Reputation points Moderator
    2021-06-21T16:54:57.42+00:00

    @kumar kaushal Kindly note that at any point of time, maximum records that any query can return is 30000 which you are aware from the prompt you have seen. In your case, I would suggest you to split the time duration and retrieve the records in blocks and export it.

    For your reference ,same information is documented in this article.

    107687-image.png


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.