こんにちは、SWX3人目の熊谷(悠)です。
掲題の内容の解決法を残しておきます。
事象
Datadog Agent(のコンテナ)がエラーを出力する
"log": "2021-06-14 11:33:16 UTC | CORE | ERROR | (pkg/collector/runner/runner.go:301 in work) | Error running check istio: [{\"message\": \"Detected 1 error while loading configuration model `InstanceConfig`:\\nmetrics -> 1\\n str type expected\", \"traceback\": \"Traceback (most recent call last):\\n File \\\"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py\\\", line 971, in run\\n initialization()\\n File \\\"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py\\\", line 396, in load_configuration_models\\n instance_config = self.load_configuration_model(package_path, 'InstanceConfig', raw_instance_config)\\n File \\\"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py\\\", line 436, in load_configuration_model\\n raise_from(ConfigurationError('\\\\n'.join(message_lines)), None)\\n File \\\"<string>\\\", line 3, in raise_from\\ndatadog_checks.base.errors.ConfigurationError: Detected 1 error while loading configuration model `InstanceConfig`:\\nmetrics -> 1\\n str type expected\\n\"}]\n"
DatadogサイトのInfrastructure Listの対象ホストにintegration issue
が表示される
Datadog has detected 1 integration with issues: Datadog’s istio integration is reporting: ・Instance #istio:8a41704874d07a5d[ERROR]: [{"message": "Detected 1 error while loading configuration model `InstanceConfig`:\nmetrics -> 1\n str type expected", "traceback": "Traceback (most recent call last):\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py\", line 971, in run\n initialization()\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py\", line 396, in load_configuration_models\n instance_config = self.load_configuration_model(package_path, 'InstanceConfig', raw_instance_config)\n File \"/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py\", line 436, in load_configuration_model\n raise_from(ConfigurationError('\\n'.join(message_lines)), None)\n File \"<string>\", line 3, in raise_from\ndatadog_checks.base.errors.ConfigurationError: Detected 1 error while loading configuration model `InstanceConfig`:\nmetrics -> 1\n str type expected\n"}]
原因
Agent v7.28.1に含まれる Istioインテグレーション v3.11.0で、下記エラーが出力される原因となるバグが存在しておりました。 2021/06/23 Datadogサポート回答より
Error: Detected 1 error while loading configuration model `InstanceConfig`: metrics -> 1 str type expected Traceback (most recent call last): File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py", line 971, in run initialization() File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py", line 396, in load_configuration_models instance_config = self.load_configuration_model(package_path, 'InstanceConfig', raw_instance_config) File "/opt/datadog-agent/embedded/lib/python3.8/site-packages/datadog_checks/base/checks/base.py", line 436, in load_configuration_model raise_from(ConfigurationError('\n'.join(message_lines)), None) File "<string>", line 3, in raise_from datadog_checks.base.errors.ConfigurationError: Detected 1 error while loading configuration model `InstanceConfig`: metrics -> 1 str type expected
修正予定バージョン
この修正は、Istio Integration v3.12.0 / Agent v7.29.0に含まれる予定となっております。 2021/06/23 Datadogサポート回答より
暫定回避策
Istio Integrationが必要な場合
v7.29.0がリリースされるまでの間、v7.27.0にダウングレードします。
(チャートのAgentバージョン指定箇所を変更してhelm upgrade
)
# agents.image.tag -- Define the Agent version to use ## Use 7-jmx to enable jmx fetch collection tag: 7.28.1 # 変更↓ tag: 7.27.0
Istio Integrationが不要の場合
values.yamlのignoreAutoConfigにistioを追加し、auto_conf.yamlを無視するように設定します。
(チャートのignoreAutoConfig指定箇所に追記してhelm upgrade
)
# datadog.ignoreAutoConfig -- List of integration to ignore auto_conf.yaml. ## ref: https://docs.datadoghq.com/agent/faq/auto_conf/ ignoreAutoConfig: [] # - redisdb # - kubernetes_state # 変更↓ ignoreAutoConfig: - istio # - redisdb # - kubernetes_state