Hello Andy Lim,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you would like to know more about the best practices and considerations for integrating Azure Monitor with Azure Kubernetes Service (AKS) using both the Data Collection Rules (DCR) method and the ConfigMap method.
DCR and ConfigMap have Pros and Cons, major differences are the followings:
DCR | ConfigMap |
---|---|
Granular Control | Direct Control |
Central Management and Modern | Simplicity |
If both methods are used, the precedence typically depends on how the monitoring agents are configured and deployed. However, in general:
DCR Configurations usually take precedence as they are centrally managed by Azure Monitor and might override or complement configurations specified in ConfigMaps. So, therefore, if ConfigMaps are used to configure specific agents or monitoring settings, they might still be active but could be overridden by the DCR settings if there is a conflict.
To avoid confusion and ensure consistency: It’s best to avoid using both methods simultaneously for the same purpose to prevent conflicts and unpredictable behavior. Given that DCR is the modern and recommended approach, consider transitioning fully to DCR if possible. This will streamline management and align with best practices.
For more reading about Azure Monitor best practices for Kubernetes, kindly use the additional resources available by the right side of this page. Especially, the followings:
- Best practices for monitoring Kubernetes with Azure Monitor - Azure Monitor
- Best practices for Azure Monitor Logs - Azure Monitor
- Azure Monitor best practices: Configure data collection - Azure Monitor
Accept Answer
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.
Best Regards,
Sina Salam