Skip to content

datadog cookbook upgrade #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions cookbooks/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
Changes
=======

# 2.13.0 / 2017-12-01

* [FEATURE] Add support for Logs, See [#490][] [@tmichelet][]
* [FEATURE] Add go-metro recipe, [#484][] [@iancward][]
* [FEATURE] Add tokumx recipe, [#486][] [@gswallow][]
* [FEATURE] Add couchbase recipe, [#487][] [@gswallow][]
* [FEATURE] Add experimental support of Agent 6 beta RPMs, [#493][] [@olivielpeau][]
* [FEATURE] Allow `disable_ssl_validation` in the apache conf, [#480][] [@stolfi][]
* [BUGFIX] Fix `warn_on_missing_keys` option of redis integration, [#495][] [@iancward][] & [@olivielpeau][]
* [BUGFIX] Fix default log file directory on Windows, [#492][] [@borgilb][] & [@olivielpeau][]
* [BUGFIX] Add check to consul template for `tags` key, [#479][] [@grogancolin][]

# 2.12.0 / 2017-09-28

* [FEATURE] Support of Agent 6 beta for debianoids, [#472][] [@olivielpeau][]
* [FEATURE] Add `tag_families` option to RabbitMQ template, [#437][] & [#460][] [@lefthand][] & [@foobarto][]
* [FEATURE] Bring elasticsearch template up-to-date, [#445][] & [#462][] [@AlexBevan][] & [@kylegoch][]
* [FEATURE] Add `additional_metrics` and `collections` to mongo template , [#463][] [@otterdude97][]
* [OPTIMIZE] Explicitly set `gpgcheck` to true for `yum_repository`, [#458][] [@dafyddcrosby][]
* [BUGFIX] Adding support for amazon linux based images with recent versions of ohai, [#448][] [@frezbo][]
* [BUGFIX] Fix `ssl_verify` option of rabbitmq template, [#474][] [@iancward][]
* [DOCS] Fix missing array braces in supervisord example, [#454][] [@benmanns][]

# 2.11.0 / 2017-09-21

* [FEATURE] Add configuration for the process-agent, [#465][] [@conorbranagan][]
* [FEATURE] Add SNMP recipe, [#436][] [@mlcooper][]
* [OPTIMIZE] Do not include `yum` recipe to avoid overwriting main yum config, [#446][] [@olivielpeau][]
* [BUGFIX] Avoid failures of agent `service` resource with frequent restarts on systemd, [#469][] [@olivielpeau][]

# 2.10.1 / 2017-05-31

* [OPTIMIZE] Add compatibility with `windows` cookbook `3.0`, [#438][] [@olivielpeau][]
Expand Down Expand Up @@ -546,8 +576,32 @@ A fix has gone in to `apt` 2.1.0 that relaxes this condition, and plays well wit
[#430]: https://github.com/DataDog/chef-datadog/issues/430
[#433]: https://github.com/DataDog/chef-datadog/issues/433
[#435]: https://github.com/DataDog/chef-datadog/issues/435
[#436]: https://github.com/DataDog/chef-datadog/issues/436
[#437]: https://github.com/DataDog/chef-datadog/issues/437
[#438]: https://github.com/DataDog/chef-datadog/issues/438
[#445]: https://github.com/DataDog/chef-datadog/issues/445
[#446]: https://github.com/DataDog/chef-datadog/issues/446
[#448]: https://github.com/DataDog/chef-datadog/issues/448
[#454]: https://github.com/DataDog/chef-datadog/issues/454
[#458]: https://github.com/DataDog/chef-datadog/issues/458
[#460]: https://github.com/DataDog/chef-datadog/issues/460
[#462]: https://github.com/DataDog/chef-datadog/issues/462
[#463]: https://github.com/DataDog/chef-datadog/issues/463
[#465]: https://github.com/DataDog/chef-datadog/issues/465
[#469]: https://github.com/DataDog/chef-datadog/issues/469
[#472]: https://github.com/DataDog/chef-datadog/issues/472
[#474]: https://github.com/DataDog/chef-datadog/issues/474
[#479]: https://github.com/DataDog/chef-datadog/issues/479
[#480]: https://github.com/DataDog/chef-datadog/issues/480
[#484]: https://github.com/DataDog/chef-datadog/issues/484
[#486]: https://github.com/DataDog/chef-datadog/issues/486
[#487]: https://github.com/DataDog/chef-datadog/issues/487
[#490]: https://github.com/DataDog/chef-datadog/issues/490
[#492]: https://github.com/DataDog/chef-datadog/issues/492
[#493]: https://github.com/DataDog/chef-datadog/issues/493
[#495]: https://github.com/DataDog/chef-datadog/issues/495
[@ABrehm264]: https://github.com/ABrehm264
[@AlexBevan]: https://github.com/AlexBevan
[@BrentOnRails]: https://github.com/BrentOnRails
[@DorianZaccaria]: https://github.com/DorianZaccaria
[@EasyAsABC123]: https://github.com/EasyAsABC123
Expand All @@ -565,16 +619,20 @@ A fix has gone in to `apt` 2.1.0 that relaxes this condition, and plays well wit
[@arthurnn]: https://github.com/arthurnn
[@babbottscott]: https://github.com/babbottscott
[@bai]: https://github.com/bai
[@benmanns]: https://github.com/benmanns
[@bflad]: https://github.com/bflad
[@bitmonk]: https://github.com/bitmonk
[@borgilb]: https://github.com/borgilb
[@brentm5]: https://github.com/brentm5
[@ccannell67]: https://github.com/ccannell67
[@chrissnell]: https://github.com/chrissnell
[@clmoreno]: https://github.com/clmoreno
[@clofresh]: https://github.com/clofresh
[@cobusbernard]: https://github.com/cobusbernard
[@conorbranagan]: https://github.com/conorbranagan
[@coosh]: https://github.com/coosh
[@ctrlok]: https://github.com/ctrlok
[@dafyddcrosby]: https://github.com/dafyddcrosby
[@darron]: https://github.com/darron
[@datwiz]: https://github.com/datwiz
[@degemer]: https://github.com/degemer
Expand All @@ -590,10 +648,14 @@ A fix has gone in to `apt` 2.1.0 that relaxes this condition, and plays well wit
[@elijahandrews]: https://github.com/elijahandrews
[@evan2645]: https://github.com/evan2645
[@flah00]: https://github.com/flah00
[@foobarto]: https://github.com/foobarto
[@frezbo]: https://github.com/frezbo
[@gkze]: https://github.com/gkze
[@gmmeyer]: https://github.com/gmmeyer
[@graemej]: https://github.com/graemej
[@gregf]: https://github.com/gregf
[@grogancolin]: https://github.com/grogancolin
[@gswallow]: https://github.com/gswallow
[@hartfordfive]: https://github.com/hartfordfive
[@hilli]: https://github.com/hilli
[@historus]: https://github.com/historus
Expand All @@ -616,6 +678,8 @@ A fix has gone in to `apt` 2.1.0 that relaxes this condition, and plays well wit
[@kindlyseth]: https://github.com/kindlyseth
[@krasnoukhov]: https://github.com/krasnoukhov
[@kurochan]: https://github.com/kurochan
[@kylegoch]: https://github.com/kylegoch
[@lefthand]: https://github.com/lefthand
[@martinisoft]: https://github.com/martinisoft
[@mattrobenolt]: https://github.com/mattrobenolt
[@mfischer-zd]: https://github.com/mfischer-zd
Expand All @@ -629,6 +693,7 @@ A fix has gone in to `apt` 2.1.0 that relaxes this condition, and plays well wit
[@nyanshak]: https://github.com/nyanshak
[@olivielpeau]: https://github.com/olivielpeau
[@opsline-radek]: https://github.com/opsline-radek
[@otterdude97]: https://github.com/otterdude97
[@phlipper]: https://github.com/phlipper
[@qqfr2507]: https://github.com/qqfr2507
[@raycrawford]: https://github.com/raycrawford
Expand All @@ -638,6 +703,7 @@ A fix has gone in to `apt` 2.1.0 that relaxes this condition, and plays well wit
[@schisamo]: https://github.com/schisamo
[@sethrosenblum]: https://github.com/sethrosenblum
[@stensonb]: https://github.com/stensonb
[@stolfi]: https://github.com/stolfi
[@takus]: https://github.com/takus
[@tejom]: https://github.com/tejom
[@thisismana]: https://github.com/thisismana
Expand Down
13 changes: 0 additions & 13 deletions cookbooks/datadog/LICENSE

This file was deleted.

6 changes: 6 additions & 0 deletions cookbooks/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ Datadog Cookbook

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

This cookbook includes experimental support of the beta version of the Datadog Agent 6.0, please refer to
the [inline docs](https://github.com/DataDog/chef-datadog/blob/v2.12.0/attributes/default.rb#L31-L66)
for more details on the supported platforms and how to use it.

For general information on the Datadog Agent 6, please refer to the [datadog-agent](https://github.com/DataDog/datadog-agent/) repo.

**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**

Expand Down
90 changes: 88 additions & 2 deletions cookbooks/datadog/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,45 @@
# Set it as an attribute, or on your node `run_state` under the key `['datadog']['application_key']`
default['datadog']['application_key'] = nil

########################################################################
### Beta-Agent6-only attributes, experimental ###
### These attributes are not part of the stable API of the cookbook ###
### Subject to breaking changes between bugfix/minor versions ###
### Only works on Linux (DEB/RPM) for now ###

# Set to true to install an agent6 instead of agent5.
# To upgrade from agent5 to agent6, you need to:
# * set node['datadog']['agent6'] to true, and
# * either set node['datadog']['agent6_version'] to an existing agent6 version (recommended), or
# set node['datadog']['agent6_package_action'] to 'upgrade'
# To downgrade from agent6 to agent5, you need to:
# * set node['datadog']['agent6'] to false, and
# * pin node['datadog']['agent_version'] to an existing agent5 version, and
# * set node['datadog']['agent_allow_downgrade'] to true
default['datadog']['agent6'] = false
# Default of `nil` will install latest version, applies to agent6 only.
# See documentation of `agent_version` attribute for allowed configuration format.
default['datadog']['agent6_version'] = nil
default['datadog']['agent6_package_action'] = 'install' # set to `upgrade` to always upgrade to latest

# beta repos where datadog-agent v6 packages are available
default['datadog']['agent6_aptrepo'] = 'http://apt.datadoghq.com'
default['datadog']['agent6_aptrepo_dist'] = 'beta'
# RPMs are only available for RHEL >= 6 (-> use https protocol) and x86_64 arch
default['datadog']['agent6_yumrepo'] = 'https://yum.datadoghq.com/beta/x86_64/'

# Values that differ on Windows
# The location of the config folder (containing conf.d)
default['datadog']['agent6_config_dir'] = '/etc/datadog-agent'

# Set a key to true to make the agent6 use the v2 api on that endpoint, false otherwise.
# Leave key value to nil to use agent6 default for that endpoint.
# Supported keys: "series", "events", "service checks"
default['datadog']['use_v2_api'] = {}

### End of Beta-Agent6-only experimental attributes ###
########################################################################

# Use this attribute to send data to additional accounts
# (agent and handler if enabled)
# The key can be anything you want, 'prod' is used there as an example
Expand Down Expand Up @@ -93,6 +132,8 @@
'https'
end

# NB: if you're not using the default repos and/or distributions, make sure
# to pin the version you're installing with node['datadog']['agent_version']
default['datadog']['installrepo'] = true
default['datadog']['aptrepo'] = 'http://apt.datadoghq.com'
default['datadog']['aptrepo_dist'] = 'stable'
Expand Down Expand Up @@ -121,6 +162,7 @@
# Values that differ on Windows
# The location of the config folder (containing conf.d)
# The name of the dd agent service
# The log file directory (see logging section below)
if node['platform_family'] == 'windows'
default['datadog']['config_dir'] = "#{ENV['ProgramData']}/Datadog"
default['datadog']['agent_name'] = 'DatadogAgent'
Expand All @@ -145,7 +187,7 @@
# Agent Version
# Default of `nil` will install latest version. On Windows, this will also upgrade to latest
# This attribute accepts either a `string` or `hash` with the key as platform_name and value of package version
# In the case of fedora use platform_name of rhel
# In the case of fedora and amazon linux, use platform_name of rhel
# Example:
# default['datadog']['agent_version'] = {
# 'rhel' => '5.9.0-1',
Expand Down Expand Up @@ -223,7 +265,12 @@
default['datadog']['syslog']['udp'] = false
default['datadog']['syslog']['host'] = nil
default['datadog']['syslog']['port'] = nil
default['datadog']['log_file_directory'] = '/var/log/datadog'
default['datadog']['log_file_directory'] =
if node['platform_family'] == 'windows'
nil # let the agent use a default log file dir
else
'/var/log/datadog'
end

# Web proxy configuration
default['datadog']['web_proxy']['host'] = nil
Expand Down Expand Up @@ -289,6 +336,45 @@
# ddtrace ruby gem version
default['datadog']['ddtrace_gem_version'] = nil

# Live processes functionality settings
# Set `enable_process_agent` to:
# * `true` to explicitly enable the process agent
# * `false` to explicitly disable it
# Leave it to `nil` to let the agent's default behavior decide whether to run the process-agent
default['datadog']['enable_process_agent'] = nil

# Comma-separated list of regex patterns matching process commands to blacklist.
# Example: 'my-secret-app,dbpass'
default['datadog']['process_agent']['blacklist'] = nil

# Comma-separated list of regex patterns of containers to include or skip.
# Each pattern should be in the form of "field:pattern" where 'field' is either
# 'image' or 'name'.
# Example: 'image:redis,image:nginx'
default['datadog']['process_agent']['container_blacklist'] = nil
# Whitelist is applied after the blacklist.
default['datadog']['process_agent']['container_whitelist'] = nil

# Full path to store process-agent logs to override the default.
default['datadog']['process_agent']['log_file'] = nil

# If running in full process collection mode ('enable_process_agent' is true)
# overrides the collection intervals for the full and real-time checks in seconds.
default['datadog']['process_agent']['process_interval'] = nil
default['datadog']['process_agent']['rtprocess_interval'] = nil

# If only collecting containers ('enable_process_agent' is false but docker is available)
# overrides the collection intervals for the full and real-time check.
default['datadog']['process_agent']['container_interval'] = nil
default['datadog']['process_agent']['rtcontainer_interval'] = nil

# Logs functionality settings
# Set `enable_log_agent` to:
# * `true` to explicitly enable the log agent
# * `false` to explicitly disable it
# Leave it to `nil` to let the agent's default behavior decide whether to run the log-agent
default['datadog']['enable_logs_agent'] = nil

# For custom gem servers on restricted networks
# This attribute only works on Chef >= 12.3
# Change false to the URL of your custom gem server
Expand Down
23 changes: 23 additions & 0 deletions cookbooks/datadog/attributes/go-metro.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# The implementation for the go-metro recipe allows any package resource
# property to be defined as an attribute underneath the
# node['datadog']['go-metro']['libcap_package'] namespace
#
# For example, if you want to set the package version, you can do something
# like:
# default['datadog']['go-metro']['libcap_package']['version'] = 'foo'

# The only required option is package_name:
# valid values for RHEL-based system are: libcap, compat-libcap1
# valid values for Debian-based systems are: libcap, libcap2-bin
default['datadog']['go-metro']['libcap_package']['package_name'] = 'libcap'

# init config
default['datadog']['go-metro']['init_config'] = {
'snaplen' => 512,
'idle_ttl' => 300,
'exp_ttl' => 60,
'statsd_ip' => '127.0.0.1',
'statsd_port' => 8125,
'log_to_file' => true,
'log_level' => 'info'
}
Loading