I am trying to build a dashboard that shows a cpu and memory graph for each individual host monitored with Azure Log Analytics. Since hosts are added and removed throughout the day, there is no point in manually creating panels that have the hostname statically specified in the query, so I am trying to solve this using labels/templates/repeating. Unfortunately I am rather new to Grafana and cannot figure out how to use a label for (in my case) the computer value in the query below.
Is there a way to display graphs based on distinct hosts tracked in Log Analytics?
Could anyone point me in the right direction please? Thanks
Perf | where $__timeFilter(TimeGenerated) and Computer == "$Computer" | where ObjectName in ("Processor", "Memory") and CounterName in ("% Processor Time" , "% Committed Bytes In Use" ) | summarize avg(CounterValue) by ObjectName, bin(TimeGenerated, $__interval) | order by TimeGenerated asc