Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
Update aks-9.fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigosantosms authored Apr 5, 2024
1 parent 910855c commit ba23bf3
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions docs/content/services/container/aks/code/aks-9/aks-9.fix
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
// PM Lorraine Bichara Assad shared Kusto query code, need help to change to customer-facing Azure Resource Graph Query
cluster('aks.kusto.windows.net').database('AKSprod').ClusterLiveMetadata
| where PreciseTimeStamp > ago(2h)
| summarize arg_max(PreciseTimeStamp, persistentVolumeInfo) by cluster_id, UnderlaySubscriptionID
| extend PVCountUsingIntree = parse_json(persistentVolumeInfo).persistentVolumeCountPerSource
| where PVCountUsingIntree != "" and PVCountUsingIntree != "{}"
| mv-expand key = bag_keys(PVCountUsingIntree) to typeof(string)
| extend value=toint(PVCountUsingIntree[key])
| project-away PVCountUsingIntree
| extend source=key
| where source == 'AzureDisk' or source == 'AzureFile'
| extend source = case(
source == "AzureFile", "In-Tree File", "In-Tree Disk")
| summarize PVCountPerSub = sum(value) by source, UnderlaySubscriptionID
// under-development

0 comments on commit ba23bf3

Please sign in to comment.