Adding a custom Python package to the Agent
Datadog の調査レポート: サーバーレスの状態 レポート: サーバーレスの状態

Adding a custom Python package to the Agent

このページは日本語には対応しておりません。随時翻訳に取り組んでいます。翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください。

The Agent contains an embedded Python environment at /opt/datadog-agent/embedded/. Common binaries such as python and pip are contained within /opt/datadog-agent/embedded/bin/.

Python packages can be installed via the embedded pip:

sudo -Hu dd-agent /opt/datadog-agent/embedded/bin/pip install <PACKAGE_NAME>

The Agent contains an embedded Python environment at /opt/datadog-agent/embedded/. Common binaries such as python and pip are contained within /opt/datadog-agent/embedded/bin/.

Python packages can be installed via the embedded pip:

sudo /opt/datadog-agent/embedded/bin/pip install <PACKAGE_NAME>

Custom Python packages can be installed using the Agent’s embedded Python using the following command in PowerShell:

For Agent versions <= 6.11:

%PROGRAMFILES%\Datadog\"Datadog Agent"\embedded\python -m pip install <PACKAGE_NAME>

For Agent versions >= 6.12:

%PROGRAMFILES%\Datadog\"Datadog Agent"\embedded<PYTHON_MAJOR_VERSION>\python -m pip install <PACKAGE_NAME>

Or the package can be added in the library zipped folder that can be found at

%PROGRAMFILES%\Datadog\Datadog Agent\files

then restart your Agent.

Further Reading