diff --git a/README.md b/README.md index 5d8d758a..34480984 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,20 @@ With the [`ini_setting` module](https://forge.puppet.com/modules/puppetlabs/inif 5. Verify your Puppet data is in Datadog by searching for `sources:puppet` in the [Event Stream][5]. +### NPM setup + +To enable the Datadog Agent Network Performance Monitoring (NPM) features follow these steps: + +1. (Windows only) If the Agent is already installed, uninstall it by passing `win_ensure => absent` to the main class and removing other classes' definitions. +2. (Windows only) Pass the `windows_npm_install` option with value `true` to the `datadog::datadog_agent` class. Remove `win_ensure` if added on previous step. +3. Use the `datadog_agent::system_probe` class to properly create the configuration file: + +```conf +class { 'datadog_agent::system_probe': + network_enabled => true, +} +``` + ### Troubleshooting You can run the Puppet Agent manually to check for errors in the output: @@ -281,6 +295,8 @@ These variables can be set in the `datadog_agent` class to control settings in t | `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). | +| `windows_npm_install` | A boolean to enable the Windows NPM driver installation (defaults to false). | +| `win_ensure` | An enum (present/absent) to ensure the presence/absence of the Datadog Agent on Windows (defaults to present) | | `container_collect_all` | A boolean to enable logs collection for all containers. | | `agent_extra_options`1 | A hash to provide additional configuration options (Agent v6 and v7 only). | | `hostname_extraction_regex`2 | A regex used to extract the hostname captured group to report the run in Datadog instead of reporting the Puppet nodename, for example:
`'^(?.*\.datadoghq\.com)(\.i-\w{8}\..*)?$'` | diff --git a/manifests/init.pp b/manifests/init.pp index 26ee1fd5..7fe64f77 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -233,6 +233,11 @@ # $apt_release # The distribution channel to be used for the APT repo. Eg: 'stable' or 'beta'. # String. Default: stable +# $windows_npm_install +# (Windows only) Boolean to install the Windows NPM driver. +# To use NPM features it is necessary to enable install through this flag, as well as +# configuring NPM through the datadog::system_probe class. +# Boolean. Default: false # # Sample Usage: # diff --git a/manifests/system_probe.pp b/manifests/system_probe.pp index 9a1d0837..c26753d2 100644 --- a/manifests/system_probe.pp +++ b/manifests/system_probe.pp @@ -1,3 +1,10 @@ +# Class: datadog_agent::system_probe +# +# This class contains the Datadog agent system probe (NPM) configuration. +# On Windows, install the NPM driver by setting 'windows_npm_install' +# to 'true on the datadog_agent class. +# + class datadog_agent::system_probe( Boolean $enabled = false, Boolean $network_enabled = false, @@ -26,13 +33,13 @@ } if $::operatingsystem == 'Windows' { - file { 'C:/ProgramData/Datadog/system-probe.yaml': owner => $datadog_agent::params::dd_user, group => $datadog_agent::params::dd_group, mode => '0640', content => template('datadog_agent/system_probe.yaml.erb'), require => File['C:/ProgramData/Datadog'], + notify => Service[$datadog_agent::params::service_name], } } else {