<p>I have an AKS (Azure Kubernetes)  cluster with a few different namespaces.
In one of them I have many different pods, each runs only one container.</p>
<p>Azure collects the data and ingest it to Log Analytics.</p>
<p>The problem is that in one of the namespaces I'm running nginx-ingress, which creates a lot of sttout logs.</p>
<p>I want to stop ingesting those logs to the Log Analytics, or even disable them totally (of course that I prefer to keep them in the pod itself).</p>
<p>I could only find a way to disable the entire namespace from collecting the logs, but I need to disable only this specific pod (that been created from a deployment/replicaset).</p>

Afik.A
<p>so a reasonable approach would be to put nginx-ingress into a separate namespace and dont gather logs from that namespace at all:</p>
<pre><code>[log_collection_settings.stdout]          
   enabled = true          
   exclude_namespaces = [&quot;kube-system&quot;, &quot;nginx-ingress&quot;]
</code></pre>
<p>you can edit this configmap:</p>
<pre><code>name: container-azm-ms-agentconfig
namespace: kube-system
</code></pre>
<p>Reading:<br />
<a href="https://github.com/microsoft/OMS-docker/blob/ci_feature_prod/Kubernetes/container-azm-ms-agentconfig.yaml" rel="nofollow noreferrer">https://github.com/microsoft/OMS-docker/blob/ci_feature_prod/Kubernetes/container-azm-ms-agentconfig.yaml</a><br />
<a href="https://learn.microsoft.com/en-us/azure/azure-monitor/insights/container-insights-agent-config" rel="nofollow noreferrer">https://learn.microsoft.com/en-us/azure/azure-monitor/insights/container-insights-agent-config</a><br />
<a href="https://medium.com/microsoftazure/azure-monitor-for-containers-optimizing-data-collection-settings-for-cost-ce6f848aca32" rel="nofollow noreferrer">https://medium.com/microsoftazure/azure-monitor-for-containers-optimizing-data-collection-settings-for-cost-ce6f848aca32</a></p>
<p>an alternative, would be to stop ingesting stdout log, only stderr</p>
