Restrict Log Analytics access to AKS logs

Kopl 166 Reputation points


I am trying to restrict Azure Log Analytics access to AKS for only CPU usage percentage (in order to reduce my Log Analytics bill for the ingested volume and only pay for what I use).

Any ideas on how to do that?

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,202 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 11,881 Reputation points Microsoft Employee

    Issue Summary:
    You are trying to reduce your costs for monitoring AKS cluster using Log Analytics and are only interested in collecting CPU usage percentage.


    The Azure Monitor pricing model is primarily based on the amount of data ingested in gigabytes per day into your Log Analytics workspace. The cost of a Log Analytics workspace isn't based only on the volume of data collected, it is also dependent on the plan selected, and how long you chose to store data generated from your clusters.
    Please refer to the Azure Monitor pricing page for the most recent pricing based on your Azure Monitor Log Analytics pricing model and Azure region.

    The following is a summary of what types of data are collected from a Kubernetes cluster with Container insights that influences cost and can be customized based on your usage:

    -Stdout, stderr container logs from every monitored container in every Kubernetes namespace in the cluster

    -Container environment variables from every monitored container in the cluster

    -Completed Kubernetes jobs/pods in the cluster that does not require monitoring

    -Active scraping of Prometheus metrics

    -Diagnostic log collection of Kubernetes master node logs in your AKS cluster to analyze log data generated by master components such as the kube-apiserver and kube-controller-manager.

    CPU usage percentage falls under Metrics and the pricing for Metrics are calculated as follows, as described on the pricing page:


    As per my understanding, CPU usage % is a standard metric as described here.

    Please go through the following docs to :
    -Estimate costs to monitor your AKS cluster and
    -Control ingestion to reduce cost

    Let me know if you have questions after going through these.