AKS icon indicating copy to clipboard operation
AKS copied to clipboard

Logging level to be disabled by default.

Open upasedharmaraj opened this issue 4 years ago • 8 comments

What happened: Currently, AKS logging level is set to std out enabled for all namespaces, this causes lot of log ingestions and icreases total bill.

What you expected to happen: AKS logging should be kept to error only by default and configured on demand using custom config map. https://docs.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-agent-config

How to reproduce it (as minimally and precisely as possible): 3 TB logging ingestion for 90 days happens when:

  • there are more than 10 nodes available in your cluster.
  • there is load on system

Environment:

  • Kubernetes version : AKS 1.23.5
  • Size of cluster : 5-10

upasedharmaraj avatar Aug 12 '22 06:08 upasedharmaraj

Hi upasedharmaraj, AKS bot here :wave: Thank you for posting on the AKS Repo, I'll do my best to get a kind human from the AKS team to assist you.

I might be just a bot, but I'm told my suggestions are normally quite good, as such:

  1. If this case is urgent, please open a Support Request so that our 24/7 support team may help you faster.
  2. Please abide by the AKS repo Guidelines and Code of Conduct.
  3. If you're having an issue, could it be described on the AKS Troubleshooting guides or AKS Diagnostics?
  4. Make sure your subscribed to the AKS Release Notes to keep up to date with all that's new on AKS.
  5. Make sure there isn't a duplicate of this issue already reported. If there is, feel free to close this one and '+1' the existing issue.
  6. If you have a question, do take a look at our AKS FAQ. We place the most common ones there!

ghost avatar Aug 12 '22 06:08 ghost

Triage required from @Azure/aks-pm

ghost avatar Aug 14 '22 12:08 ghost

Hey @upasedharmaraj

I figured I'd just share with you my experience here.... when I configured the OMS Agent to only export stderr logs I still found the ingestion levels to be quite high (less of course, but still far higher than I expected). When I dug a little deeper I found that many K8s components were logging 'info' level logs to stderr instead of stdout. I think (IIRC) this was due to the use of some library being used in many K8s components which simply funnelled all logs to stderr. Pretty rubbish really when you're trying to capture errors while reducing noise and cost :(

MarkTopping avatar Aug 15 '22 15:08 MarkTopping

Action required from @Azure/aks-pm

ghost avatar Aug 20 '22 16:08 ghost

Triage required from @Azure/aks-pm

ghost avatar Aug 28 '22 18:08 ghost

Action required from @Azure/aks-pm

ghost avatar Sep 02 '22 19:09 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Sep 18 '22 00:09 ghost

Hi @upasedharmaraj , please see instructions here on how to edit the ConfigMap file settings to collect stdout logs from specific namespaces. We will not change the default behavior since we provide capabilities for customers who don't want to use this.

vdiec avatar Oct 10 '22 23:10 vdiec