Template variables

    Check out the Templating documentation for an introduction to the templating feature and the different types of template variables.

    Where a subscription ID is not specified, a default subscription must be specified in the data source configuration, which will be used.

    QueryDescription
    workspace(“myWorkspace”).Heartbeat | distinct ComputerReturns a list of Virtual Machines
    workspace(“$workspace”).Heartbeat | distinct ComputerReturns a list of Virtual Machines with template variable
    workspace(“$workspace”).Perf | distinct ObjectNameReturns a list of objects from the Perf table
    workspace(“$workspace”).Perf | where ObjectName == “$object” | distinct CounterNameReturns a list of metric names from the Perf table

    Example of a time series query using variables: