Skip to content
Merged
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
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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`<sup>1</sup> | A hash to provide additional configuration options (Agent v6 and v7 only). |
| `hostname_extraction_regex`<sup>2</sup> | 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}\..*)?$'` |
Expand Down
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
#
Expand Down
9 changes: 8 additions & 1 deletion manifests/system_probe.pp
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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 {
Expand Down