Quick set of scripts to break down the cost of microservices logs runing on AKS. uses the gb storage cost to calculate the storage cost over time
Take care. The container-name is used. So if you have deployments that use the same container name in multiple deployments, you will need to split the data based on namespace or resource
let daystosearch = 24h;
ContainerLogV2
| where _IsBillable == true
| where TimeGenerated > startofday(ago(daystosearch))
| project _BilledSize, PodName, TimeGenerated, myapp = strcat(PodNamespace, ":",ContainerName)
| summarize VolumeInGB = round(sum(_BilledSize) / (1024 * 1024 * 1024), 4), TotalMBytes = round(sum(_BilledSize) / (1024 * 1024), 2) by bin(TimeGenerated, 1h), myapp