Logging level to be disabled by default.
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
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:
- If this case is urgent, please open a Support Request so that our 24/7 support team may help you faster.
- Please abide by the AKS repo Guidelines and Code of Conduct.
- If you're having an issue, could it be described on the AKS Troubleshooting guides or AKS Diagnostics?
- Make sure your subscribed to the AKS Release Notes to keep up to date with all that's new on AKS.
- 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.
- If you have a question, do take a look at our AKS FAQ. We place the most common ones there!
Triage required from @Azure/aks-pm
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 :(
Action required from @Azure/aks-pm
Triage required from @Azure/aks-pm
Action required from @Azure/aks-pm
Issue needing attention of @Azure/aks-leads
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.