list tables in log analytics workspace via cli

crikeyitsbigmikey 20 Reputation points

Hi team,

Just wanting to list all tables in a log analytics workspace but I can't seem to do so with the command. It doesn't spit out anything close to the number of tables listed in that specific LAW (I.E there's more table names spat out than the LAW has and nothing matches up).

az monitor log-analytics workspace table list --resource-group MyResourceGroup --workspace-name WorkSpaceNAME
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,321 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 15,931 Reputation points

    crikeyitsbigmikey, thank you for posting this question on Microsoft Q&A.

    The following is some basic information that should help you understand the behavior that you are observing.

    1. "Log Analytics Workspace" has a greater number of tables available than you see under "Logs" in portal. For a list of all default available tables, see Azure Monitor Logs table reference organized by category.
    2. In Portal, only those tables are shown which are not empty. Therefore, if you use a LA workspace to monitor only App Service, there is a chance that you would not see "Heartbeat" table in the list. Although, running a query against this table would not fail but will return with 0 rows.
    3. When CLI is used to get the list of all tables available, this visual filter is not applied (to return only the tables which are not empty). Therefore, the list of tables that you get from there is much larger than what you see in portal.

    If you are looking for something specific, please do share it here so that we can help you out with an alternative, as applicable.

    Hope this helps.

    If the answer helped, please click Accept answer so that it can help others in the community looking for help on similar topics.

    0 comments No comments