概要
このチェックは、Datadog Agent を通じて Cilium を監視します。このインテグレーションにより、cilium-agent
または cilium-operator
からメトリクスを収集できます。
セットアップ
ホストで実行されている Agent 用にこのチェックをインストールおよび構成する場合は、以下の手順に従ってください。コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照してこの手順を行ってください。
インストール
Cilium チェックは Datadog Agent パッケージに含まれていますが、Prometheus のメトリクスを公開するための追加のセットアップが必要です。
バージョン 1.10.0 以降、この OpenMetrics ベースのインテグレーションには、最新モード (use_openmetrics
: true) とレガシーモード (use_openmetrics
: false) があります。すべての最新機能を利用するために、Datadog は最新モードを有効にすることを推奨します。詳しくは、OpenMetrics ベースのインテグレーションにおける最新バージョニングとレガシーバージョニングを参照してください。
cilium-agent
と cilium-operator
の両方で Prometheus のメトリクスを有効にするには、Cilium のバージョンに応じて以下の Helm の値を設定した状態で Cilium をデプロイします。- Cilium < v1.8.x:
global.prometheus.enabled=true
- Cilium >= v1.8.x および < v1.9.x:
global.prometheus.enabled=true
および global.operatorPrometheus.enabled=true
- Cilium >= 1.9.x:
prometheus.enabled=true
および operator.prometheus.enabled=true
または、別途 Kubernetes のマニフェストで Prometheus のメトリクスを有効にします。
構成
ホスト
ホストで実行中の Agent に対してこのチェックを構成するには
Agent の構成ディレクトリのルートにある conf.d/
フォルダーの cilium.d/conf.yaml
ファイルを編集し、Cilium のパフォーマンスデータを収集します。使用可能なすべての構成オプションについては、cilium.d/conf.yaml のサンプルを参照してください。
cilium-agent
メトリクスを収集するには、agent_endpoint
オプションを有効にします。cilium-operator
メトリクスを収集するには、operator_endpoint
オプションを有効にします。
instances:
## @param use_openmetrics - boolean - optional - default: false
## Use the latest OpenMetrics implementation for more features and better performance.
##
## Note: To see the configuration options for the legacy OpenMetrics implementation (Agent 7.33 or older),
## see https://github.com/DataDog/integrations-core/blob/7.33.x/cilium/datadog_checks/cilium/data/conf.yaml.example
#
- use_openmetrics: true # Enables OpenMetrics latest mode
## @param agent_endpoint - string - optional
## The URL where your application metrics are exposed by Prometheus.
## By default, the Cilium integration collects `cilium-agent` metrics.
## One of agent_endpoint or operator_endpoint must be provided.
#
agent_endpoint: http://localhost:9090/metrics
## @param operator_endpoint - string - optional
## Provide instead of `agent_endpoint` to collect `cilium-operator` metrics.
## Cilium operator metrics are exposed on port 6942.
#
operator_endpoint: http://localhost:6942/metrics
Agent を再起動します。
ログ収集
Cilium には cilium-agent
と cilium-operator
の 2 種類のログがあります。
Datadog Agent で、ログの収集はデフォルトで無効になっています。以下のように、DaemonSet 構成でこれを有効にします。
# (...)
env:
# (...)
- name: DD_LOGS_ENABLED
value: "true"
- name: DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL
value: "true"
# (...)
Datadog Agent への Docker ソケットをマニフェストでマウントするか、Docker を使用していない場合は、/var/log/pods
ディレクトリをマウントします。マニフェストの例については、DaemonSet の Kubernetes インストール手順を参照してください。
Agent を再起動します。
コンテナ化
コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照して、次のパラメーターを適用してください。
Datadog Agent で、ログの収集はデフォルトで無効になっています。有効にする方法については、Kubernetes ログ収集を参照してください。
cilium-agent
のメトリクスとログを収集するには
パラメーター | 値 |
---|
<INTEGRATION_NAME> | "cilium" |
<INIT_CONFIG> | 空白または {} |
<INSTANCE_CONFIG> | {"agent_endpoint": "http://%%host%%:9090/metrics", "use_openmetrics": "true"} |
パラメーター | 値 |
---|
<LOG_CONFIG> | {"source": "cilium-agent", "service": "cilium-agent"} |
cilium-operator
のメトリクスとログを収集するには
パラメーター | 値 |
---|
<INTEGRATION_NAME> | "cilium" |
<INIT_CONFIG> | 空白または {} |
<INSTANCE_CONFIG> | {"operator_endpoint": "http://%%host%%:6942/metrics", "use_openmetrics": "true"} |
パラメーター | 値 |
---|
<LOG_CONFIG> | {"source": "cilium-operator", "service": "cilium-operator"} |
検証
Agent の status サブコマンドを実行し、Checks セクションで cilium
を探します。
収集データ
メトリクス
イベント
Cilium インテグレーションには、イベントは含まれません。
サービスチェック
トラブルシューティング
ご不明な点は、Datadog のサポートチームまでお問合せください。