Giter VIP home page Giter VIP logo

integrations-core's Introduction

Build Status Build status

Datadog Agent Integrations - Core

This repository contains the Agent Integrations (also known as checks) that Datadog officially develops and supports. To add a new integration, please see the Integrations Extras repository and the accompanying documentation.

The Datadog Agent packages are equipped with all the checks from this repository, so to get started using them, you can simply install the Agent for your operating system.

Integrations as Python wheels

When working with an integration, you will now be dealing with a more structured python project. The new structure should help keep a more sane and modular codebase. To help with the transition, please take a look at the following map to understand where everything falls into place in the new approach.

FORMER LOCATION NEW LOCATION
{integration}/check.py {integration}/datadog_checks/{integration}/{integration}.py
{integration}/conf.yaml.example {integration}/datadog_checks/{integration}/conf.yaml.example
n/a {integration}/datadog_checks/{integration}/__init__.py
{integration}/test_check.py {integration}/test/test_{integration}.py
n/a {integration}/test/__init__.py
n/a {integration}/setup.py

A note about installing

Now that integrations are cleanly defined as python packages, we will soon be able to ship them as Python wheels that will be pip-installable in the Python environment embedded into the Datadog Agent. This presents a paradigm change in the way we will be delivering standalone integration upgrades, moving away from OS-specific packages to idiomatic Python package delivery.

Agent releases starting from version 5.21 bundle the latest wheels for any integration, but at the moment you can't upgrade or downgrade between releases.

Development

You can follow these instructions to get a working copy of any check on your local Python environment; this is mostly useful to run tests or for tinkering in general.

Prerequisites

  • Python 2.7, see this page for more details.

Quickstart

The project comes with a requirements file you can pass to pip to install all the dependencies needed to work with any check. From the root of the repo, run:

pip install -r requirements-dev.txt

To work with a specific check you need to install its own dependencies. The easiest way to iterate on a check development is installing the wheel itself in editable mode. For example, if you want to do this for the disk check run the following:

cd disk && pip install -e .

To double check everything is working as expected you can run:

python -c"from datadog_checks.disk import Disk"

if the commands ends without errors, you're good to go!

Testing

To run the testsuite for a given check you can either use tox, like:

cd disk && tox

or invoke Pytest directly:

cd disk && py.test

Note: only a subset of the checks can be tested like this. Porting all the checks to Pytest is a work in progress, this is the list of the checks supporting the new testing approach:

For checks that are not listed here, please refer to Legacy development Setup.

Building

setup.py provides the setuptools setup script that will help us package and build the wheel. If you wish to learn more about python packaging please take a look at the official python documentation here

Once your setup.py is ready, creating a wheel is a easy as:

cd {integration}
python setup.py bdist_wheel

Reporting Issues

For more information on integrations, please reference our documentation and knowledge base. You can also visit our help page to connect with us.

integrations-core's People

Contributors

antoinepouille avatar charlyf avatar christinetchen avatar degemer avatar derekwbrown avatar dixonscottr avatar gmmeyer avatar hkaj avatar hush-hush avatar ian28223 avatar infothrill avatar irabinovitch avatar isauve avatar jeffwidman avatar kmshultz avatar l0k0ms avatar masci avatar mfpierre avatar nbparis avatar nmuesch avatar ofek avatar olivielpeau avatar remh avatar sjenriquez avatar technovangelist avatar themsquared avatar truthbk avatar xvello avatar yannmh avatar zippolyte avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.