How/Is it possible to filter in/out logs from AKS on Log Analytics

Thomas Ferfelis 0 Reputation points
2024-07-30T07:25:28.8233333+00:00

Hello,

I want to ask how and whether is it possible to filter logs that are coming from AKS on Log Analytics workspace. In our case we want to exclude some containers from the sending logs on log analytics with the purpose of reducing the amount of unneeded logs on workspace.

Thanks,

Thomas

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,458 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Thomas Ferfelis 0 Reputation points
    2024-08-06T10:50:09.5766667+00:00

    Hello,

    Yeah but if it comes to exclude pods in a non-system ns you cant with this configuration. Although we did find a way to exclude using this configmap by annotating pods for exclusion. Your answer was helpful enough for us.

    Thanks,

    Thomas

    #[log_collection_settings.filter_using_annotations]
    # if enabled will exclude logs from pods with annotations fluenbit.io/exclude: "true".
    # Read more: https://docs.fluentbit.io/manual/pipeline/filters/kubernetes#kubernetes-annotations
    	# enabled = false
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.