AKS icon indicating copy to clipboard operation
AKS copied to clipboard

Does microsoft managed namespace "gatekeeper-system" cause high log analytics traffic and therefore costs?

Open ipg-informatik opened this issue 4 years ago • 16 comments

We have already tried to clarify the case with three azure tickets. Unfortunately without a satisfactory answer. Therefore we try it over this way.

We have multiple aks clusters with enabled azure monitor. Also we have the azure policy add-on enabled. We were wondering about the high log analytics traffic and then checked what was causing this traffic. With the workbook "data usage" (aks cluster - insights - workbook "data usage" - by namespace) we saw that the most traffic was caused by the namespace "gatekeeper-system". This namespace is managed by microsoft and is used for azure policy. Microsoft has confirmed that the exclusion [1] of the namespace "gatekeeper-system" does not affect the azure policies. It's used only for the pod logs.

So far so good, but we are surprised that microsoft simply stores their own logs on the customer's log analytics workspace and thus causes them high costs. We found no reference in the documentation that the microsoft namespace 'gatekeeper-system' is not excluded by default.

  • Can you confirm the facts?
  • Can you confirm that these logs are charged to the customer?
  • What is microsofts position on the customer having to pay for microsofts own logs?

[1] https://docs.microsoft.com/en-gb/azure/azure-monitor/containers/container-insights-agent-config

Regards

ipg-informatik avatar Jun 02 '22 07:06 ipg-informatik

Hi ipg-informatik, 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 Jun 02 '22 07:06 ghost

Triage required from @Azure/aks-pm

ghost avatar Jun 04 '22 12:06 ghost

Action required from @Azure/aks-pm

ghost avatar Jun 09 '22 16:06 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Jun 24 '22 18:06 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Jul 09 '22 18:07 ghost

The gatekeeper pod logs could be useful to advanced users if they want to see detailed violation information. Most users who use azure policy addon rely on azure policy compliance result to get this information. @robbiezhang do you recall what was the rationale to not exclude gatekeeper logs by default? Do we instead want to document this configuration for advanced users so they can opt-in for more logs instead of opt-out to exclude? @miwithro thoughts?

ritazh avatar Jul 13 '22 19:07 ritazh

Triage required from @Azure/aks-pm

ghost avatar Jul 16 '22 00:07 ghost

Hi @ritazh, Your suggestion with the opt-in for extended logs would be good. Depending on the cluster, the gatekeeper logs cause up to 90% of the total log volume for us. Regards

ipg-informatik avatar Jul 20 '22 09:07 ipg-informatik

Action required from @Azure/aks-pm

ghost avatar Jul 25 '22 16:07 ghost

Issue needing attention of @Azure/aks-leads

ghost avatar Aug 09 '22 18:08 ghost

As I know, the Azure monitor doesn't exclude any logs from any namespace on AKS. @ganga1980 to correct me if I'm wrong.

Ganga, is there a doc about how to configure the log collection settings on AKS? https://docs.microsoft.com/en-gb/azure/azure-monitor/containers/container-insights-agent-config

robbiezhang avatar Aug 09 '22 20:08 robbiezhang

So by default AzMon exclude kube-system namespace. We should also exclude "gatekeeper-system". But for now you can exclude "gatekeeper-system" via config-map as documented here. https://docs.microsoft.com/en-gb/azure/azure-monitor/containers/container-insights-agent-config

saaror avatar Aug 09 '22 21:08 saaror

Triage required from @Azure/aks-pm

ghost avatar Aug 12 '22 00:08 ghost

Action required from @Azure/aks-pm

ghost avatar Aug 17 '22 01:08 ghost

Hi @ipg-informatik , we are working on this, and it's expected to be available by the end of October. I'll ping here with more details once it's available.

vdiec avatar Sep 20 '22 18:09 vdiec

Hi @ipg-informatik , this fix has been rolled out. You can see more details in our release notes https://github.com/microsoft/Docker-Provider/blob/ci_prod/ReleaseNotes.md#10052022--

vdiec avatar Nov 03 '22 20:11 vdiec