AKS Monitoring Addon and Log Analytics Workspace: Configuring Cross‑Subscription Retention Policies
0 reputation · 13 Mar 2020, 11:21 UTC
0 reputation · 13 Mar 2020, 11:21 UTC
Enable the Azure Monitor for containers addon on an AKS cluster and route all node, pod, and container logs to a Log Analytics workspace that resides in a different subscription. The objective is to maintain a unified observability view while controlling data retention periods to manage cost and meet compliance requirements.
When the workspace is cross‑subscription, billing is split between the resource group owning the cluster and the subscription holding the workspace. Retention periods are enforced at the workspace level, but it is unclear whether the addon allows per‑namespace or per‑pod retention overrides, and how Fluentd sampling interacts with the configured retention.
15000 reputation · 13 Mar 2020, 20:02 UTC
The AKS monitoring addon cannot apply different retention periods per namespace; retention is a workspace‑wide setting.
Log Analytics Contributor role on the target workspace in the other subscription.az aks update -g -n --enable-addons monitoring --log-analytics-workspace-resource-id /subscriptions//resourceGroups//providers/Microsoft.OperationalInsights/workspaces/
retentionTime property) and applies to all ingested data, regardless of source subscription or namespace.Check the workspace retention:
az monitor log-analytics workspace show -g -n --query retentionTimeUse comments to ask for clarification. Post a solution as an answer.
No question comments on this page.