Supported OS Linux Windows Mac OS

インテグレーションバージョン2.4.3

概要

このチェックは、Datadog Agent を通じて Argo CD を監視します。

セットアップ

インストール

Argo CD チェックは Datadog Agent パッケージに含まれています。 サーバーに追加でインストールする必要はありません。

: この機能を使用するには、Agent v7.42.0 以上が必要です。

構成

Argo CD は、以下の 3 つのコンポーネントについて Prometheus 形式のメトリクスを公開しています。

  • アプリケーションコントローラー
  • API Server
  • リポジトリサーバー

Datadog Agent は、このインテグレーションを使用して、公開されたメトリクスを収集することができます。以下の手順に従って、コンポーネントの一部または全部からデータ収集を構成してください。

: このチェックでは、メトリクスの収集に OpenMetrics を使用しており、Python 3 が必要です。

コンテナ化

メトリクスの収集

Prometheus 形式のメトリクスが Argo CD クラスターで公開されていることを確認します。Argo CD のデフォルトマニフェストを使用している場合、これはデフォルトで有効になっています。Agent がすべてのメトリクスを収集するためには、前述の 3 つのコンポーネントのそれぞれにアノテーションを付ける必要があります。アノテーションの詳細については、オートディスカバリーインテグレーションテンプレートを参照してください。その他の構成オプションは、サンプル argocd.d/conf.yaml を確認することで利用可能です。

There are use cases where Argo CD Applications contain labels that need to be exposed as Prometheus metrics. These labels are available using the argocd_app_labels metric, which is disabled on the Application Controller by default. Refer to the ArgoCD Documentation for instructions on how to enable it.

構成例:

アプリケーションコントローラー:

apiVersion: v1
kind: Pod
# (...)
metadata:
  name: '<POD_NAME>'
  annotations:
    ad.datadoghq.com/argocd-application-controller.checks: |
      {
        "argocd": {
          "init_config": {},
          "instances": [
            {
              "app_controller_endpoint": "http://%%host%%:8082/metrics"
            }
          ]
        }
      }      
    # (...)
spec:
  containers:
    - name: 'argocd-application-controller'
# (...)

API サーバー:

apiVersion: v1
kind: Pod
# (...)
metadata:
  name: '<POD_NAME>'
  annotations:
    ad.datadoghq.com/argocd-server.checks: |
      {
        "argocd": {
          "init_config": {},
          "instances": [
            {
              "api_server_endpoint": "http://%%host%%:8083/metrics"
            }
          ]
        }
      }      
    # (...)
spec:
  containers:
    - name: 'argocd-server'
# (...)

リポジトリサーバー:

apiVersion: v1
kind: Pod
# (...)
metadata:
  name: '<POD_NAME>'
  annotations:
    ad.datadoghq.com/argocd-repo-server.checks: |
      {
        "argocd": {
          "init_config": {},
          "instances": [
            {
              "repo_server_endpoint": "http://%%host%%:8084/metrics"
            }
          ]
        }
      }      
    # (...)
spec:
  containers:
    - name: 'argocd-repo-server'
# (...)

Note: For the full list of supported endpoints, see the conf.yaml example file.

Troubleshooting

Clashing Tag Names: The Argo CD integration attaches a name tag derived from the application name OpenMetrics label when available. This could sometimes lead to querying issues if a name tag is already attached to a host, as seen in the example name: host_a, app_a. To prevent any unwanted behavior when querying, it is advisable to remap the name label to something more unique, such as argocd_app_name if the host happens to already have a name tag. Below is an example configuration:

アプリケーションコントローラー:

apiVersion: v1
kind: Pod
# (...)
metadata:
  name: '<POD_NAME>'
  annotations:
    ad.datadoghq.com/argocd-application-controller.checks: |
      {
        "argocd": {
          "init_config": {},
          "instances": [
            {
              "app_controller_endpoint": "http://%%host%%:8082/metrics",
              "rename_labels": {
                "name": "argocd_app_name"
              }
            }
          ]
        }
      }      
    # (...)
spec:
  containers:
    - name: 'argocd-application-controller'
# (...)
ログ収集

Agent バージョン 6.0 以降で利用可能

Argo CD logs can be collected from the different Argo CD pods through Kubernetes. Collecting logs is disabled by default in the Datadog Agent. To enable it, see Kubernetes Log Collection.

See the Autodiscovery Integration Templates for guidance on applying the parameters below.

パラメーター
<LOG_CONFIG>{"source": "argocd", "service": "<SERVICE_NAME>"}

検証

Run the Agent’s status subcommand and look for argocd under the Checks section.

収集データ

メトリクス

イベント

Argo CD インテグレーションには、イベントは含まれません。

サービスチェック

トラブルシューティング

ご不明な点は Datadog サポートまでお問い合わせください。

その他の参考資料

お役に立つドキュメント、リンクや記事:

PREVIEWING: may/embedded-workflows