Skip to content

Latest commit

 

History

History
 
 

datadog_checks_downloader

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Datadog Checks Downloader

Overview

This package provides the secure downloader used by the Datadog Agent to download Agent-based Integrations (also known as Checks). Internally, it uses The Update Framework (TUF) and in-toto in order to provide end-to-end verification of integrations between our developers and end-users. There is a blog post forthcoming shortly that will explain in more detail the security guarantees. Interested readers may also wish to consult our KubeCon 2018 talk for more details.

Presently, the downloader is limited to downloading packages of integrations-core, but not integrations-extras.

Installation

This package is expected to be built and included with the DataDog Agent beginning with version 6.10.0. There is a blog post forthcoming shortly that will explain in more detail how to use the Datadog Agent to transparently download and install new or updated integrations.

Development

Create a dedicated virtualenv and follow the instructions in this paragraph to work with the check.

To install the check in dev mode:

pip install -e '.[deps]'

To install also development dependencies needed for executing tests:

pip install -r requirements-dev.txt

To download a new or updated integration, you may specify a precise version:

python -m datadog_checks.downloader -vvvv datadog-$INTEGRATION --version X.Y.Z

Or you may leave the version unspecified to download the latest version:

python -m datadog_checks.downloader -vvvv datadog-$INTEGRATION

To run the tests, install tox and just run:

tox

You can select between online and offline tests when running testsuite using pytest:

pytest -vvvv -m online     # Run tests that use data from publicly a accessible repository.
pytest -vvvv -m offline    # Run tests that use data stored in the Git repository.

For online tests, you can specify explicitly distribution and its version to run tests against:

pytest -vvvv -m online --distribution-name datadog-active-directory --distribution-version 1.10.0

To run checks against content served from own local directory where TUF, in-toto and wheel files are present:

pytest -vvvv --local-dir=/path/to/dir --distribution-name datadog-active-directory --distribution-version 1.10.0

Troubleshooting

Need help? Contact Datadog support.