Using a custom configuration for EKS Cloudwatch Observability addon

0

Hi, I am attempting to deploy the EKS add-on for container insights using the cloudwatch observability addon (version: v1.2.1-eksbuild.1) but I do not want container logs enabled as we already deploy fluentd for this. I'm facing an issue where I want to pass --configuration-values '{ "containerLogs": { "enabled": false } }' but within the larger context of setting the entire configuration on what to run

Folllowing the guide https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/install-CloudWatch-Observability-EKS-addon.html#install-CloudWatch-Observability-EKS-addon-configuration

--configuration-values '{
  "agent": {
    "config": {
      "logs": {
        "metrics_collected": {
          "app_signals": {},
          "kubernetes": {
            "enhanced_container_insights": true
          }
        }
      }
    }
  
}'

When deployed like this the block containerLogs.enabled shows up in the configMap (if it's not deployed this way it doesn't show up in the configmap) however logs are still being created and fluentbit is deployed

{
    "agent" : {
      "config" : {
        "logs" : {
          "metrics_collected" : {
            "app_signals" : {},
            "kubernetes" : {
              "enhanced_container_insights" : true
            }
          }
        },
        "containerLogs" : {
          "enabled" : false
        }
      }
    }
  }

Can anyone provide me with the correct configuration for this add-on so that I don't deploy application logs with fluentbit along with app signals?

Setting the following doesn't seem to work

        "containerLogs" : {
          "enabled" : false
        }

I have checked the logs for the pods cloudwatch-agent-8qjwp and i cannot find any configuration details that are setting container logs disabled

ian
質問済み 3ヶ月前1097ビュー
2回答
1

Are there any possibilities to filter/reduce the amount of metrics ingested by the cloudwatch-agent as well?

回答済み 1ヶ月前
0
承認された回答

It seems incorrectly assumed that the cw-agent config should have this block in it, which is why I updated my configuration to include it within agent.config, but that seems to have not caused any errors with the agent, and allowed container logs to be enabled. Revisting the docs i realize that containerLogs should exist at the top level of json along with "agent".

Updating to this fixes my issue

{
    "agent" : {
      "config" : {
        "logs" : {
          "metrics_collected" : {
            "app_signals" : {},
            "kubernetes" : {
              "enhanced_container_insights" : true
            }
          }
        }
      }
    },
    "containerLogs" : {
      "enabled" : false
    }

ian
回答済み 3ヶ月前
profile pictureAWS
エキスパート
レビュー済み 3ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ