(レガシー) Observability Pipelines Worker のセットアップ
This product is not supported for your selected
Datadog site. (
).
If you upgrade your OP Workers version 1.8 or below to version 2.0 or above, your existing pipelines will break. Do not upgrade your OP Workers if you want to continue using OP Workers version 1.8 or below. If you want to use OP Worker 2.0 or above, you must migrate your OP Worker 1.8 or earlier pipelines to OP Worker 2.x.
Datadog recommends that you update to OP Worker versions 2.0 or above. Upgrading to a major OP Worker version and keeping it updated is the only supported way to get the latest OP Worker functionality, fixes, and security updates.
概要
The Observability Pipelines Worker can collect, process, and route logs from any source to any destination. Using Datadog, you can build and manage all of your Observability Pipelines Worker deployments at scale.
観測可能性パイプラインワーカーを使い始めるには、いくつかの方法があります。
- クイックスタート: デモデータを出力するシンプルなパイプラインを備えたワーカーをインストールすれば、すぐに使い始められます。
- Datadog セットアップガイド: Datadog Agent からデータを受信し、Datadog へルーティングするためのすぐに使えるパイプラインを備えたワーカーをインストールします。
- Datadog アーカイブセットアップガイド: Datadog Agent からデータを受信し、Datadog および S3 へルーティングするためのすぐに使えるパイプラインを備えたワーカーをインストールします。
- Splunk セットアップガイド: Splunk HEC からデータを受信し、Splunk と Datadog の両方へルーティングするためのすぐに使えるパイプラインを備えたワーカーをインストールします。
このドキュメントでは、クイックスタートのインストール手順を説明し、次のステップのためのリソースを提供します。このソフトウェアの使用および運用には、エンドユーザーライセンス契約が適用されます。
Deployment Modes
Remote configuration for Observability Pipelines is in private beta. Contact
Datadog support or your Customer Success Manager for access.
If you are enrolled in the private beta of Remote Configuration, you can remotely roll out changes to your Workers from the Datadog UI, rather than make updates to your pipeline configuration in a text editor and then manually rolling out your changes. Choose your deployment method when you create a pipeline and install your Workers.
See Updating deployment modes on how to change the deployment mode after a pipeline is deployed.
前提条件
観測可能性パイプラインワーカーをインストールするには、以下が必要です。
新しい API キーとパイプラインを生成するには
- Observability Pipelines に移動します。
- New Pipeline をクリックします。
- パイプラインの名前を入力します。
- Next をクリックします。
- 希望するテンプレートを選択し、指示に従います。
Quickstart
以下の手順に従ってワーカーをインストールし、デモデータを使用するサンプルパイプライン構成をデプロイします。
観測可能性パイプラインワーカーのインストール
The Observability Pipelines Worker Docker image is published to Docker Hub here.
サンプルのパイプラインコンフィギュレーションファイルをダウンロードします。この構成は、デモデータを出力し、データをパースして構造化し、それをコンソールと Datadog に送信します。サンプル構成で使用されているソース、トランスフォーム、シンクの詳細については、構成を参照してください。
Run the following command to start the Observability Pipelines Worker with Docker:
docker run -i -e DD_API_KEY=<API_KEY> \
-e DD_OP_PIPELINE_ID=<PIPELINE_ID> \
-e DD_SITE=<SITE> \
-p 8282:8282 \
-v ./pipeline.yaml:/etc/observability-pipelines-worker/pipeline.yaml:ro \
datadog/observability-pipelines-worker run
<API_KEY>
は Datadog API キー、<PIPELINES_ID>
は観測可能性パイプライン構成 ID、<SITE>
は
に置き換えてください。注: ./pipeline.yaml
には、ステップ 1 でダウンロードした構成の相対パスまたは絶対パスを指定します。
AWS EKS 用の Helm チャートの values ファイルをダウンロードします。サンプル構成で使用されているソース、トランスフォーム、シンクの詳細については、構成を参照してください。
Helm チャートで、datadog.apiKey
と datadog.pipelineId
の値をパイプラインに合わせて置き換え、site
の値には
を使用します。その後、以下のコマンドでクラスターにインストールします。
helm repo add datadog https://helm.datadoghq.com
helm upgrade --install \
opw datadog/observability-pipelines-worker \
-f aws_eks.yaml
Azure AKS 用の Helm チャートの values ファイルをダウンロードします。サンプル構成で使用されているソース、トランスフォーム、シンクの詳細については、構成を参照してください。
Helm チャートで、datadog.apiKey
と datadog.pipelineId
の値をパイプラインに合わせて置き換え、site
の値には
を使用します。その後、以下のコマンドでクラスターにインストールします。
helm repo add datadog https://helm.datadoghq.com
helm upgrade --install \
opw datadog/observability-pipelines-worker \
-f azure_aks.yaml
Google GKE 用の Helm チャートの values ファイルをダウンロードします。サンプル構成で使用されているソース、トランスフォーム、シンクの詳細については、構成を参照してください。
Helm チャートで、datadog.apiKey
と datadog.pipelineId
の値をパイプラインに合わせて置き換え、site
の値には
を使用します。その後、以下のコマンドでクラスターにインストールします。
helm repo add datadog https://helm.datadoghq.com
helm upgrade --install \
opw datadog/observability-pipelines-worker \
-f google_gke.yaml
1 行のインストールスクリプトまたは手動でワーカーをインストールします。
1 行のインストールスクリプト
1 行のインストールコマンドを実行して、ワーカーをインストールします。<DD_API_KEY>
を Datadog API キー、<PIPELINES_ID>
を観測可能性パイプライン ID、<SITE>
を
に置き換えます。
DD_API_KEY=<DD_API_KEY> DD_OP_PIPELINE_ID=<PIPELINES_ID> DD_SITE=<SITE> bash -c "$(curl -L https://install.datadoghq.com/scripts/install_script_op_worker1.sh)"
サンプルのコンフィギュレーションファイルをホストの /etc/observability-pipelines-worker/pipeline.yaml
にダウンロードします。サンプル構成で使用されているソース、トランスフォーム、シンクの詳細については、構成を参照してください。
ワーカーを起動します。
sudo systemctl restart observability-pipelines-worker
手動インストール
以下のコマンドを実行し、APT が HTTPS 経由でダウンロードするようにセットアップします。
sudo apt-get update
sudo apt-get install apt-transport-https curl gnupg
以下のコマンドを実行して、システム上に Datadog の deb
リポジトリをセットアップし、Datadog のアーカイブキーリングを作成します。
sudo sh -c "echo 'deb [signed-by=/usr/share/keyrings/datadog-archive-keyring.gpg] https://apt.datadoghq.com/ stable observability-pipelines-worker-1' > /etc/apt/sources.list.d/datadog-observability-pipelines-worker.list"
sudo touch /usr/share/keyrings/datadog-archive-keyring.gpg
sudo chmod a+r /usr/share/keyrings/datadog-archive-keyring.gpg
curl https://keys.datadoghq.com/DATADOG_APT_KEY_CURRENT.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
curl https://keys.datadoghq.com/DATADOG_APT_KEY_06462314.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
curl https://keys.datadoghq.com/DATADOG_APT_KEY_F14F620E.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
curl https://keys.datadoghq.com/DATADOG_APT_KEY_C0962C7D.public | sudo gpg --no-default-keyring --keyring /usr/share/keyrings/datadog-archive-keyring.gpg --import --batch
Run the following commands to update your local apt
repo and install the Worker:
sudo apt-get update
sudo apt-get install observability-pipelines-worker datadog-signing-keys
Add your keys and the site (
) to the Worker’s environment variables:
sudo cat <<-EOF > /etc/default/observability-pipelines-worker
DD_API_KEY=<API_KEY>
DD_OP_PIPELINE_ID=<PIPELINE_ID>
DD_SITE=<SITE>
EOF
ホストの /etc/observability-pipelines-worker/pipeline.yaml
にサンプルコンフィギュレーションファイルをダウンロードします。
ワーカーを起動します。
sudo systemctl restart observability-pipelines-worker
1 行のインストールスクリプトまたは手動でワーカーをインストールします。
1 行のインストールスクリプト
1 行のインストールコマンドを実行して、ワーカーをインストールします。<DD_API_KEY>
を Datadog API キー、<PIPELINES_ID>
を観測可能性パイプライン ID、<SITE>
を
に置き換えます。
DD_API_KEY=<DD_API_KEY> DD_OP_PIPELINE_ID=<PIPELINES_ID> DD_SITE=<SITE> bash -c "$(curl -L https://install.datadoghq.com/scripts/install_script_op_worker1.sh)"
サンプルのコンフィギュレーションファイルをホストの /etc/observability-pipelines-worker/pipeline.yaml
にダウンロードします。サンプル構成で使用されているソース、トランスフォーム、シンクの詳細については、構成を参照してください。
以下のコマンドを実行してワーカーを起動します。
sudo systemctl restart observability-pipelines-worker
手動インストール
以下のコマンドを実行して、システム上に Datadog の rpm
リポジトリをセットアップします。
cat <<EOF > /etc/yum.repos.d/datadog-observability-pipelines-worker.repo
[observability-pipelines-worker]
name = Observability Pipelines Worker
baseurl = https://yum.datadoghq.com/stable/observability-pipelines-worker-1/\$basearch/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://keys.datadoghq.com/DATADOG_RPM_KEY_CURRENT.public
https://keys.datadoghq.com/DATADOG_RPM_KEY_4F09D16B.public
https://keys.datadoghq.com/DATADOG_RPM_KEY_B01082D3.public
https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public
https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public
EOF
注: RHEL 8.1 または CentOS 8.1 を使用している場合は、上記の構成で repo_gpgcheck=1
の代わりに repo_gpgcheck=0
を使用してください。
パッケージを更新し、ワーカーをインストールします。
sudo yum makecache
sudo yum install observability-pipelines-worker
Add your keys and the site (
) to the Worker’s environment variables:
sudo cat <<-EOF > /etc/default/observability-pipelines-worker
DD_API_KEY=<API_KEY>
DD_OP_PIPELINE_ID=<PIPELINE_ID>
DD_SITE=<SITE>
EOF
サンプルのコンフィギュレーションファイルをホストの /etc/observability-pipelines-worker/pipeline.yaml
にダウンロードします。サンプル構成で使用されているソース、トランスフォーム、シンクの詳細については、構成を参照してください。
以下のコマンドを実行してワーカーを起動します。
sudo systemctl restart observability-pipelines-worker
- サンプル構成をダウンロードします。
- サンプル構成を使って、既存の Terraform に Worker モジュールをセットアップします。必ず、構成内の
vpc-id
、subnet-ids
、region
の値を AWS のデプロイに合わせて更新します。また、パイプラインに合わせて datadog-api-key
と pipeline-id
の値も更新します。
サンプル構成で使用されているソース、トランスフォーム、シンクの詳細については、構成を参照してください。
データの変換については、データを活用するを参照してください。
Updating deployment modes
After deploying a pipeline, you can also switch deployment methods, such as going from a manually managed pipeline to a remote configuration enabled pipeline or vice versa.
If you want to switch from a remote configuration deployment to a manually managed deployment:
- Navigate to Observability Pipelines and select the pipeline.
- Click the settings cog.
- In Deployment Mode, select manual to enable it.
- Set the
DD_OP_REMOTE_CONFIGURATION_ENABLED
flag to false
and restart the Worker. Workers that are not restarted with this flag continue to be remote configuration enabled, which means that the Workers are not updated manually through a local configuration file.
If you want to switch from manually managed deployment to a remote configuration deployment:
- Navigate to Observability Pipelines and select the pipeline.
- Click the settings cog.
- In Deployment Mode, select Remote Configuration to enable it.
- Set the
DD_OP_REMOTE_CONFIGURATION_ENABLED
flag to true
and restart the Worker. Workers that are not restarted with this flag are not polled for configurations deployed in the UI. - Deploy a version in your version history, so that the Workers receive the new version configuration. Click on a version. Click Edit as Draft and then click Deploy.
次のステップ
クイックスタートでは、ワーカーのインストールとサンプルパイプライン構成のデプロイについて説明しました。データを受信して Datadog Agent から Datadog へ、または Splunk HEC から Splunk と Datadog へルーティングするためのワーカーのインストール方法については、特定のユースケースを選択してください。
複数の Worker のデプロイとスケーリングに関する推奨事項については、こちらをご覧ください。
参考資料