• English日本語한국어
  • Log inStart now

Configure the infrastructure agent with Puppet

Learn how to install and configure our infrastructure agent, logs integrations, and the PHP APM agent using the newrelic_installer module. For an explanation of how to use Puppet, see the Puppet docs. This is a community-supported effort.

Here we provide basic information needed to use this configuration management tool. Additional configuration will depend on your organization's standards and implementation.

Requirements

Our Puppet module has these requirements:

  • Puppet Enterprise 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
  • Puppet 6.21.0 or higher, but lower than 8.0.0
  • Debian, CentOS, OpenSUSE, RedHat, SLES, Ubuntu, Windows, Amazon Linux

Module description

newrelic-newrelic_installer is a Puppet module that will help you scale your New Relic observability efforts. To achieve this, it uses the New Relic CLI and our open install repository.

Our Puppet module is available on Puppet Forge.

Important

Installing a specific infrastructure agent version is not supported. This method will always install the latest version of the agent.

Install the infrastructure agent with the module

Puppet Forge

bash
$
puppet module install newrelic-newrelic_installer

View more installation options on PuppetForge

Manual

  • Install puppet development kit: https://www.puppet.com/docs/pdk/2.x/pdk_install.html
  • Clone repo and build a tarball of the module using pdk build. For example, pkg/newrelic-newrelic_installer-0.1.0.tar.gz
  • Copy module tarball to your master node and install manually:
bash
$
sudo puppet module install ~/newrelic-newrelic_installer-0.1.0.tar.gz
$
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
$
Notice: Downloading from https://forgeapi.puppet.com ...
$
Notice: Installing -- do not interrupt ...
$
/etc/puppetlabs/code/environments/production/modules
$
└─┬ newrelic-newrelic_installer (v0.1.0)
$
├── lwf-remote_file (v1.1.3)
$
└── puppetlabs-powershell (v5.2.0)

Run newrelic-newrelic_installer module

To run the default newrelic-newrelic_installer module, declare the main ::install class with the instrumentation target and the New Relic account credentials.

# /etc/puppetlabs/code/environments/<YOUR_ENVIRONMENT>/manifests/site.pp
class { 'newrelic_installer::install':
targets => ["infrastructure", "logs"],
environment_variables => {
"NEW_RELIC_API_KEY" => "<YOUR-NR-API-KEY>",
"NEW_RELIC_ACCOUNT_ID" => <YOUR-NR-ACCOUNT-ID>,
"NEW_RELIC_REGION" => "<US|EU>"
}
}

Puppet parameters

Here are the parameters for the newrelic_installer::install public class:

Parameter

Type

IsRequired

Parameter description

targets

String

Required

Specifies target to be instrumented with New Relic.

Supported values include:

  • 'infrastructure' - New Relic infrastructure agent
  • 'logs' - Logs integration for New Relic infrastructure agent. *requires 'infrastructure'
  • 'php' - New Relic PHP APM agent

environment_variables

Hash

Required

Hash of environment variables to set prior to execution.

  • NEW_RELIC_API_KEY: your New Relic user key. Required.
  • NEW_RELIC_ACCOUNT_ID: your New Relic account ID. Required.
  • NEW_RELIC_REGION: your data center region (US or EU). Defaults to US.
  • NEW_RELIC_APPLICATION_NAME: used by 'php'. This config option sets the application name that data is reported under in APM. Defaults to 'PHP Application' if not specified.

verbosity

String

Optional

Specifies command output verbosity

Supported values include

  • debug
  • trace

tags

Hash

Optional

Hash of tags associated with entities instrumented with New Relic. Examples:

  • {'key-name' => 'value', 'foo' => 'bar'}

proxy

String

Optional

Sets the proxy server the agent should use. Examples:

  • https://myproxy.foo.com:8080
  • http://10.10.254.254

install_timeout_seconds

Integer

Optional

Sets the timeout in seconds for New Relic installations. Default is 600.

Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.