-
Notifications
You must be signed in to change notification settings - Fork 259
Agent 7 support #588
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
Agent 7 support #588
Changes from 34 commits
85ff117
2ea3cc8
2653d72
d36a56c
774a50f
a05d2e9
dddcdcb
a33aa20
8da3665
edd9473
59384e0
6b7f316
54ee365
dcf1416
ddafbb4
da9f32d
9db150f
bf7a39d
f62859e
01753ae
261153e
6fef12a
92788f7
b508316
83ca7a4
03b7c19
153f782
4aedd98
4a4c7f6
b8d485d
7128420
aac9500
a5a1c45
3c54fe9
75c1203
41116d8
0d8bdf0
b85f666
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,29 +6,18 @@ Puppet & Datadog | |
| [](https://forge.puppetlabs.com/datadog/datadog_agent) | ||
|
|
||
|
|
||
| Description | ||
| ----------- | ||
| ## Description | ||
|
|
||
| A module to: | ||
|
|
||
| 1. Install the [DataDog][1] Agent. | ||
| 1. Install the [Datadog][1] Agent. | ||
| 2. Send Puppet run reports to [Datadog][1]. | ||
|
|
||
| Releases | ||
| -------- | ||
|
|
||
| The current version of this Puppet module is compatible with Puppet >= 4.6.x. For users running on older versions of Puppet the legacy module, series 1.x, should support most use-cases. | ||
|
|
||
| The majority of users should be able to use the current version, as the Puppet versions supported in the 1.x series of the module have been EOL'd. | ||
|
|
||
| Some features might be back-ported if there's enough demand, but in general only maintenance is performed on the 1.x series of the module. Future feature development is performed on the newer Puppet module. | ||
|
|
||
| Version 2.x | ||
| ----------- | ||
|
|
||
| ## Requirements | ||
|
|
||
| For detailed information on compatibility, check the [module page][2] on the Puppet forge. | ||
| The current version of this Puppet module supports both Linux and Windows and is compatible with Puppet >= 4.6.x. | ||
|
|
||
| For detailed information on compatibility, check the [module page on Puppet Forge][2]. | ||
|
|
||
| ## Installation | ||
|
|
||
|
|
@@ -46,56 +35,24 @@ class{ 'datadog_agent': | |
| } | ||
| ``` | ||
|
|
||
| ### Upgrade from the previous module version 1.x | ||
|
|
||
| Most of the manifests are backward compatible. However, there are important changes to the main manifest: | ||
|
|
||
| - By default Datadog Agent 6.x is installed. | ||
| - To use Agent 5.x in your nodes set the `agent5_enable` boolean parameter to `True`. | ||
| - Enhanced support for our APM Tracing Agent. | ||
| - Enhanced support for our Process Agent. | ||
| - Enhanced support for additional `agent6` options. | ||
| - APM Tracing and Process Agents are now opt-in options and are disabled by default. | ||
| - The main `datadog_agent` class has parameters to enable and configure the Agents easily. | ||
| - Increased granularity for apt/yum repo configuration. | ||
| - New location for Datadog Puppet reporting configuration. | ||
| ### Upgrade from the previous module version 2.x | ||
|
|
||
|
|
||
| Version 1.x | ||
| ----------- | ||
|
|
||
| ## Requirements | ||
|
|
||
| Puppet >=2.7.x and <=4.2.x. For detailed information on compatibility, check the [module page][2] on the Puppet forge. | ||
|
|
||
| ## Installation | ||
|
|
||
| Install `datadog_agent` as a module in your Puppet master's module path. | ||
|
|
||
| ``` | ||
| puppet module install datadog-datadog_agent --version 1.12.1 | ||
| ``` | ||
|
|
||
| ### Upgrade from previous git manual install 0.x (unreleased) | ||
|
|
||
| You can keep using the `datadog` module but it becomes legacy with the release of `datadog_agent` 1.0.0. Upgrade to get new features, and use the Puppet forge system which is easier for maintenance. | ||
|
|
||
| * Delete the Datadog module `rm -r /etc/puppet/modules/datadog` | ||
| * Install the new module from the Puppet forge `puppet module install datadog-datadog_agent` | ||
| * Update your manifests with the new module class, basically replace `datadog` by `datadog_agent` | ||
| - By default Datadog Agent 7.x is installed. To use an earlier Agent version change the setting `agent_major_version`. | ||
| - `agent5_enable` is no longer used, as it has been replaced by `agent_major_version`. | ||
| - `agent6_extra_options` has been renamed to `agent_extra_options` since it now applies to both Agent version 6 and 7. | ||
| - `agent6_log_file` has been renamed to `agent_log_file` since it now applies to both Agent version 6 and 7. | ||
| - `agent5_repo_uri` and `agent6_repo_uri` become `agent_repo_uri` for all Agent versions. | ||
| - `conf_dir` and `conf6_dir` become `conf_dir` for all Agent versions. | ||
| - The repository file created on Linux is now named `datadog` for all agent versions instead of `datadog5`/`datadog6`. | ||
|
|
||
| Usage | ||
| ----- | ||
|
|
||
| The following instructions are for both Puppet module versions (1.x, 2.x). | ||
|
|
||
| Note: 2.x installs Agent v6 by default, whereas 1.x defaults to Agent v5. | ||
|
|
||
| Once the `datadog_agent` module is installed on your `puppetserver`/`puppetmaster`, follow these configuration steps: | ||
| Once the `datadog_agent` module is installed on your `puppetserver`/`puppetmaster` (or on a masterless host), follow these configuration steps: | ||
|
|
||
| 1. Update the default class parameters with your [API key][3]. | ||
| 1. Find your Datadog [API key][3]. | ||
|
|
||
| 2. Specify the module on any nodes you wish to install the DataDog Agent. | ||
| 2. Specify the module on any nodes you wish to install the Datadog Agent. | ||
|
|
||
| ``` | ||
| include datadog_agent | ||
|
|
@@ -118,13 +75,8 @@ Once the `datadog_agent` module is installed on your `puppetserver`/`puppetmaste | |
| } | ||
| ``` | ||
|
|
||
| - To support reporting, your Puppet master needs the [dogapi][4] gem installed. To install, either run the Puppet Agent on your master with this configuration or install it manually with `gem`. You might need to restart your `puppetserver` service for the freshly installed `dogapi-rb` gem to be picked up. | ||
| - On version 2.x, `puppetserver_gem` is defined as a module dependency, it is installed automatically when the module is installed. | ||
| - On version 1.x: | ||
| - If you are on Puppet Enterprise or POSS (ie. >=3.7.0), there is a soft dependency for reporting on the `puppetserver_gem` module. Install with `puppet module install puppetlabs-puppetserver_gem` - installing manually with `gem` does *not* work. | ||
| - You may install `dogapi-rb` with `gem` as the system-level Ruby is used. | ||
| - The gem provider is configurable by setting it to `puppetserver_gem` (set by default on PE/POSS (>=3.7.0)) or `gem` if on older versions of Puppet. | ||
| - For users running puppet in standalone/masterless mode you will need to set the `puppet_gem_provider` to `puppet_gem` (or `gem` depending on versions) to ensure the `dogapi-rb` is available. | ||
| - To support reporting, your Puppet master needs the [dogapi][4] gem installed. To install, either run the Puppet Agent on your master with this configuration or install it manually with `gem`. You might need to restart your `puppetserver` service for the freshly installed `dogapi` gem to be picked up. | ||
| - `puppetserver_gem` is defined as a module dependency, it is installed automatically when the module is installed. | ||
|
|
||
| 3. Include any other integrations you want the agent to use, for example: | ||
|
|
||
|
|
@@ -166,7 +118,7 @@ The field `ensure` can be either `present` (default) or `absent`, the later bein | |
|
|
||
| Reporting | ||
| --------- | ||
| Ensure `dogapi-rb` is available on your system as explained earlier. | ||
| Ensure the `dogapi` gem is available on your system as explained earlier. | ||
|
|
||
| To enable reporting of changes to the Datadog timeline, enable the report processor on your Puppet master, and enable reporting for your clients. The clients send a run report after each check-in back to the master. | ||
|
|
||
|
|
@@ -265,7 +217,7 @@ Run Puppet Agent | |
| ---------------- | ||
|
|
||
| ``` | ||
| sudo systemctl /etc/init.d/puppetmaster restart | ||
| sudo systemctl restart puppetserver | ||
| sudo puppet agent --onetime --no-daemonize --no-splay --verbose | ||
| ``` | ||
|
|
||
|
|
@@ -306,50 +258,32 @@ datadog_agent::tags: | |
|
|
||
| These variables can be set in the `datadog_agent` class to control settings in the Agent: | ||
|
|
||
| #### 2.x | ||
|
|
||
| | variable name | description | | ||
| |-----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| | `agent_major_version` | The version of the Agent to install: either 5, 6 or 7 (default: 7). | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think Moreover, the behavior and expected values of
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was undocumented before A7 support, so I left it as it was. I documented both in |
||
| | `agent_version` | Lets you pin a specific minor version of the agent to install, eg: `1:7.16.0-1`. Leave empty to install the latest version (not recommended). | | ||
| | `collect_ec2_tags` | Set this to yes to have an instance's custom EC2 tags used as agent tags. | | ||
| | `collect_instance_metadata` | Set this to yes to have an instance's EC2 metadata used as agent tags. | | ||
| | `datadog_site` | The Datadog site to report to. Defaults to `datadoghq.com`, set to `datadoghq.eu` to report to the EU site. Supported since v2.4.0 of the module, and only with Agent v6+ | | ||
| | `dd_url` | The Datadog intake server URL. You are unlikely to need to change this. Overrides `datadog_site` | | ||
| | `datadog_site` | The Datadog site to report to. Defaults to `datadoghq.com`, set to `datadoghq.eu` to report to the EU site (Agent versions 6 and 7 only). | | ||
| | `dd_url` | The Datadog intake server URL. You are unlikely to need to change this. Overrides `datadog_site` | | ||
| | `host` | Overrides the node's host name. | | ||
| | `local_tags` | An array of <KEY:VALUE> strings that are set as tags for the node. | | ||
| | `non_local_traffic` | Set this to allow other nodes to relay their traffic through this one. | | ||
| | `agent5_enable` | A boolean to install Agent v5 and override the Agent v6 default. | | ||
| | `apm_enabled` | A boolean to enable the APM Agent (defaults to false). | | ||
| | `apm_analyzed_spans` | A hash to add APM events for the Trace Search & Analytics tool. (defaults to undef). For example: `{ 'app\|rails.request' => 1, 'service-name\|operation-name' => 0.8 }` | | ||
| | `process_enabled` | A boolean to enable the process agent (defaults to false). | | ||
| | `scrub_args` | A boolean to enable the process cmdline scrubbing (defaults to true). | | ||
| | `custom_sensitive_words` | An array to add more words beyond the default ones used by the scrubbing feature (defaults to []). | | ||
| | `logs_enabled` | A boolean to enable the logs agent (defaults to false). | | ||
| | `container_collect_all` | A boolean to enable logs collection for all containers. | | ||
| | `agent6_extra_options` | A hash to provide additional configuration options to Agent v6. | | ||
| | `agent_extra_options` | A hash to provide additional configuration options (Agent versions 6 and 7 only). | | ||
| | `hostname_extraction_regex` | A regex used to extract the hostname captured group to report the run in Datadog instead of reporting the Puppet nodename, for example:<br>`'^(?<hostname>.*\.datadoghq\.com)(\.i-\w{8}\..*)?$'` | | ||
|
|
||
| ##### Notes: | ||
|
|
||
| - `agent6_extra_options` is used to provide a fine grain control of additional Agent v6 config options. A deep merge is performed that may override options provided in the `datadog_agent` class parameters. | ||
| - `agent_extra_options` is used to provide a fine grain control of additional Agent v6/v7 config options. A deep merge is performed that may override options provided in the `datadog_agent` class parameters. | ||
| - `hostname_extraction_regex` is useful when the Puppet module and the Datadog Agent are reporting different host names for the same host in the infrastructure list. | ||
|
|
||
| #### 1.x | ||
|
|
||
| | variable name | description | | ||
| |-----------------------------|---------------------------------------------------------------------------| | ||
| | `collect_ec2_tags` | Set this to yes to have an instance's custom EC2 tags used as agent tags. | | ||
| | `collect_instance_metadata` | Set this to yes to have an instance's EC2 metadata used as agent tags. | | ||
| | `dd_url` | The Datadog intake server URL. You are unlikely to need to change this. | | ||
| | `host` | Overrides the node's host name. | | ||
| | `local_tags` | An array of <KEY:VALUE> strings that are set as tags for the node. | | ||
| | `non_local_traffic` | Set this to allow other nodes to relay their traffic through this one. | | ||
| | `agent6_enable` | A boolean to install Agent v6 and override the Agent v5 default. | | ||
|
|
||
| ### Proxy Settings | ||
|
|
||
| To connect to the Internet through a proxy, set `proxy_host`, `proxy_port`, `proxy_user` and `proxy_password`. | ||
|
|
||
|
|
||
| Module Development and Testing | ||
| ============================== | ||
|
|
||
|
|
@@ -388,4 +322,3 @@ pre-commit install | |
| [4]: https://github.com/DataDog/dogapi-rb | ||
| [5]: https://app.datadoghq.com/account/settings#integrations | ||
| [6]: https://app.datadoghq.com/event/stream | ||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.