'get all tables for x number of log analytics workspaces
I'm trying to get the tables for a set of Log Analytics workspace's using https://docs.microsoft.com/en-us/rest/api/loganalytics/tables/list-by-workspace#code-try-0_ Either I'm misinterpreting the documentation but would expect it to return the tables that I see in the Azure portal but apparently the query returns ALL tables that exist..
I'm basically looking for a away to get a table of all the tables across x Log Analytics workspaces.
Solution 1:[1]
When listing all tables at workspace scope (By using rest) you are basically listing all available active tables. some of the tables (Microsoft built in tables specifically) are tied to the existence of solutions with no relation if real data was ingested to them.
when reviewing the workspace logs blade by using Azure portal, only tables with actual data are being shown by default, this is the source of the inconsistency you experienced.
they even have a knob stating the same
there is no method to list all tables with "data only" when addressing Azure Monitor control plane by using rest.
There is no method to list all tables at resource group scope, so the best you can achieve is what you experienced, listing all active tables at workspace scope.
You can inspect the relation between tables-solutions at this page: https://docs.microsoft.com/en-us/azure/azure-monitor/reference/tables/tables-category
you can see that many tables share the same solution, the relation is actually many to many, some of those solutions like Log Management are also available by default with every workspace.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |