Coder Social home page Coder Social logo

dafyddcrosby / chef-datadog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from datadog/chef-datadog

0.0 3.0 0.0 978 KB

Chef cookbook for Datadog Agent & Integrations

Home Page: https://www.datadoghq.com

License: Other

Ruby 79.99% HTML 19.75% Shell 0.25%

chef-datadog's Introduction

Where to Find the Code

To submit issues and patches please visit https://github.com/DataDog/chef-datadog. The code is licensed under the Apache License 2.0 (see LICENSE for details).

Chef cookbook Build Status Circle CI Coverage Status GitHub forks GitHub stars Build Status

Datadog Cookbook

Chef recipes to deploy Datadog's components and configuration automatically.

NB: This README may refer to features that are not released yet. Please check the README of the git tag/the gem version you're using for your version's documentation

Requirements

  • chef >= 10.14

Platforms

  • Amazon Linux
  • CentOS
  • Debian
  • RedHat
  • Scientific Linux
  • Ubuntu
  • Windows (requires chef >= 12.0)

Cookbooks

The following Opscode cookbooks are dependencies:

  • apt
  • chef_handler
  • windows
  • yum

Note for Chef 11 users: please use these additional dependency version contraints for compatibility with Chef 11:

cookbook 'apt', '< 4.0'
cookbook 'chef_handler', '< 2.0'
cookbook 'windows', '< 2.0'
cookbook 'yum', '~> 3.0'

(in Berkshelf/Librarian format)

Recipes

default

Just a placeholder for now, when we have more shared components they will probably live there.

dd-agent

Installs the Datadog agent on the target system, sets the API key, and start the service to report on the local system metrics

Notes for Windows:

  • With Chef >= 12.6 and the windows cookbook >= 1.39.0, Agent upgrades are known to fail. For Chef>=12.6 users on Windows, we recommend pinning the windows cookbook to a lower version (~> 1.38.0 for instance).

    If that's not an option, a known workaround is to use the remove-dd-agent recipe (since the 2.5.0 version of the present cookbook) to uninstall the Agent prior to any Agent upgrade.

  • Because of changes in the Windows Agent packaging and install in version 5.12.0, when upgrading the Agent from versions <= 5.10.1 to versions >= 5.12.0, please set the windows_agent_use_exe attribute to true.

    Once the upgrade is complete, you can leave the attribute to its default value (false).

    For more information on these Windows packaging changes, see the related docs on the dd-agent wiki.

dd-handler

Installs the chef-handler-datadog gem and invokes the handler at the end of a Chef run to report the details back to the newsfeed.

dogstatsd-(python|ruby)

Installs the language-specific libraries to interact with dogstatsd.

ddtrace-(python|ruby)

Installs the language-specific libraries for application Traces (APM).

other

There are many other integration-specific recipes, that are meant to assist in deploying the correct agent configuration files and dependencies for a given integration.

Usage

  1. Add this cookbook to your Chef Server, either by installing with knife or by adding it to your Berksfile:
cookbook 'datadog', '~> 2.7.0'
  1. Add your API Key either:
  • as a node attribute via an environment or role, or
  • as a node attribute by declaring it in another cookbook at a higher precedence level, or
  • in the node run_state by setting node.run_state['datadog']['api_key'] in another cookbook preceding datadog's recipes in the run_list. This approach has the benefit of not storing the credential in clear text on the Chef Server.
  1. Create an 'application key' for chef_handler here, and add it as a node attribute or in the run state, as in Step #2.

    NB: if you're using the run state to store the api and app keys you need to set them at compile time before datadog::dd-handler in the run list.

  2. Associate the recipes with the desired roles, i.e. "role:chef-client" should contain "datadog::dd-handler" and a "role:base" should start the agent with "datadog::dd-agent". Here's an example role with both recipes:

name 'example'
description 'Example role using DataDog'

default_attributes(
  'datadog' => {
    'api_key' => 'api_key',
    'application_key' => 'app_key'
  }
)

run_list %w(
  recipe[datadog::dd-agent]
  recipe[datadog::dd-handler]
)
  1. Wait until chef-client runs on the target node (or trigger chef-client manually if you're impatient)

We are not making use of data_bags in this recipe at this time, as it is unlikely that you will have more than one API key and one application key.

For more deployment details, visit the Datadog Documentation site.

chef-datadog's People

Contributors

abrehm264 avatar alq666 avatar bflad avatar chrissnell avatar darron avatar dcrosta avatar degemer avatar dorianzaccaria avatar dwradcliffe avatar elijahandrews avatar flah00 avatar gmmeyer avatar graemej avatar iancward avatar jedi4ever avatar jmanero-r7 avatar joe-devries-sp avatar martinisoft avatar mfischer-zd avatar miketheman avatar mlcooper avatar olivielpeau avatar phlipper avatar remh avatar rlaveycal avatar sethrosenblum avatar stevedomin avatar thisismana avatar timusg avatar wk8 avatar

Watchers

 avatar  avatar  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.