Adding Azure monitor container into Dashboard

2/1/2019

I need to create my dashboard in Azure and need to add or pin the Azure monitor containers data into it. Also need to add the monitoring insights of my Kubernes service into my dashboard please

-- user11000454
azure
azure-monitoring
kubernetes

2 Answers

2/12/2019

Check this thread: Azure AKS Monitoring - custom dashboard resources

Also, here is a good query about cluster-wide cpu/memory utilization:

let endDateTime = now();
let startDateTime = ago(14d);
let trendBinSize = 1d;
let capacityCounterName = 'cpuCapacityNanoCores';
let usageCounterName = 'cpuUsageNanoCores';
KubeNodeInventory
| where TimeGenerated < endDateTime
| where TimeGenerated >= startDateTime
// cluster filter would go here if multiple clusters are reporting to the same Log Analytics workspace
| distinct ClusterName, Computer
| join hint.strategy=shuffle (
    Perf
    | where TimeGenerated < endDateTime
    | where TimeGenerated >= startDateTime
    | where ObjectName == 'K8SNode'
    | where CounterName == capacityCounterName
    | summarize LimitValue = max(CounterValue) by Computer, CounterName, bin(TimeGenerated, trendBinSize)
    | project Computer, CapacityStartTime = TimeGenerated, CapacityEndTime = TimeGenerated + trendBinSize, LimitValue
) on Computer
| join kind=inner hint.strategy=shuffle (
    Perf
    | where TimeGenerated < endDateTime + trendBinSize
    | where TimeGenerated >= startDateTime - trendBinSize
    | where ObjectName == 'K8SNode'
    | where CounterName == usageCounterName
    | project Computer, UsageValue = CounterValue, TimeGenerated
) on Computer
| where TimeGenerated >= CapacityStartTime and TimeGenerated < CapacityEndTime
| project ClusterName, Computer, TimeGenerated, UsagePercent = UsageValue * 100.0 / LimitValue
| summarize Avg = avg(UsagePercent), P95 = percentile(UsagePercent, 95), P90 = percentile(UsagePercent, 90) by bin(TimeGenerated, trendBinSize) 
| render timechart

Replace metric names with the following to create a chart of memory utilization:

let capacityCounterName = 'memoryCapacityBytes';
let usageCounterName = 'memoryRssBytes';

If you want to filter to a cluster, use this in place of comment in the query above:

| where ClusterName == '<my-cluster-name>'

Hope this is going to be a good start for your dashboard... As you explore the queries and tables available in Log Analytics with info on your cluster, you'll find much useful data...

-- Vitaly
Source: StackOverflow

2/1/2019

I am from the product team. What is it that you exactly want to pin from Monitoring Insights? Is it the CPU/Memory Usage? Container Perf? If we can understand that, we will be able to help you better.

-- Dilip Raghunathan
Source: StackOverflow