question

MandeepMatharu-3509 avatar image
0 Votes"
MandeepMatharu-3509 asked MandeepMatharu-3509 commented

Is it possible to configure multiple Log Analytics workspaces with AKS container insight?

Hi,

I am trying to figure out if it is possible to configure multiple log analytics workspace for container insights. I have a log analytics workspace in the same subscription where my AKS cluster is hosted and another workspace in another subscription which is used as centralized log analytics workspace. I just wanted to check if it is possible to configure more than one log analytics workspaces for AKS container insights ?

Thanks.

azure-kubernetes-service
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

shivapatpi-MSFT avatar image
0 Votes"
shivapatpi-MSFT answered MandeepMatharu-3509 commented

Hello @MandeepMatharu-3509 ,
It might not be possible to configure multiple Log Analytics workspaces for AKS container insights.

When you enable monitoring using Log Analytics workspace :-
1) It will deploy omsagent pods on each node which will scrape the metrics from those corresponding nodes and push them to workspace. (these agents are controlled by daemon set)
2) It will deploy a omsagent replicaset (This will pull the cluster level metrics and push them to workspace)

In your scenario , if both the subscriptions are under the same tenant you can use Azure CLI to enable monitoring to point directly to the workspace from other subscription

az aks enable-addons -g <rgname> -n <aksclustername> -a monitoring --workspace-resource-id "/subscriptions/<subid>/resourcegroups/<rgname>/providers/microsoft.operationalinsights/workspaces/<workspaceid>"


Kindly let us know if you have additional questions.


Regards,
Shiva.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @shivapatpi-MSFT,

Thanks for your response.

The solution you have suggested to configure container insights to a log analytics workspace in another subscription (a centralized management subscription, under the same tenant) has already been configured. As it is a centralized workspace and collects logs/metrics from multiple subscriptions / services, the developers in the AKS subscription doesn't have access to the same. So the ask was to check if it is possible to configure another log analytics workspace in the developer's subscription so that they can access the logs / metrics without assigning them access to the management log analytics workspace.

Based on your answer and other forums/MS documentation, it seems it won't be possible. So I am accepting your reply as an answer.

Once again, thanks for your time.

0 Votes 0 ·