Forge Home


A Puppet module for installing New Relic Infrastructure Agent


4,155 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.16.1 (latest)
  • 0.16.0
  • 0.15.0
  • 0.14.0
  • 0.13.0
  • 0.12.0
  • 0.11.0
  • 0.10.2
  • 0.10.1
  • 0.10.0
  • 0.10.0-legacy
  • 0.9.0
  • 0.8.3
  • 0.8.2
  • 0.8.1
  • 0.8.0
  • 0.7.1
  • 0.7.0
  • 0.6.1
  • 0.5.1
  • 0.5.0
  • 0.4.0
  • 0.3.1
  • 0.3.0
released Dec 2nd 2022
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 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, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.0.0 < 8.0.0
  • , , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'newrelic-newrelic_infra', '0.16.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add newrelic-newrelic_infra
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install newrelic-newrelic_infra --version 0.16.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



newrelic/newrelic_infra — version 0.16.1 Dec 2nd 2022

New Relic Community Plus header

run_tests release_puppet

Puppet module for the New Relic infrastructure agent

This Puppet module installs and configures the New Relic infrastructure agent and on-host integrations.

Install and use the Puppet module

What the newrelic-infra Puppet module affects

  • Adds the New Relic Infrastructure package repository source.
  • Installs and configures the New Relic Infrastructure agent.

Getting started with newrelic-infra

Start by declaring the main ::agent class.


All interactions with newrelic-infra are done through the main agent class.

Install the infrastructure agent

Use the following snippet to install the infrastructure agent:

class { 'newrelic_infra::agent':
    ensure      => 'latest',
    license_key => 'YOUR_LICENSE_KEY',



Public classes




Specifies the Infrastructure agent ensure status.

Supported values include:

  • 'latest' - (default) Installs the latest agent version.
  • 'absent' - Uninstalls the agent.
  • string - String containing a specific version to pin

Specifies the New Relic license key to use.

display_name (Optional)

Overrides the auto-generated hostname for reporting.

verbose (Optional)

Enables verbose logging for the agent when the value is set to 1. Default value is 0.

log_file (Optional)

To log to another location, provide a full path and file name. When not set, the agent logs to the system log files.

Typical default locations:

  • Amazon Linux, CentOS, RHEL: /var/log/messages
  • Debian, Ubuntu: /var/log/syslog
  • Windows Server: C:\Program Files\New Relic\newrelic-infra\newrelic-infra.log
proxy (Optional)

Sets the proxy server the agent should use. Examples:

custom_attributes (Optional)

A hash of custom attributes to annotate the data from this agent instance.

custom_configs (Optional)

A hash of agent configuration directives that are not exposed explicitly. Example:

{'payload_compression' => 0, 'selinux_enable_semodule' => false}

windows_provider (Optional)

Allows for the selection of a provider other than windows for the Windows MSI install. Or allows the Windows provider to be used if another provider such as Chocolatey has been specified as default in the Puppet installation.

windows_temp_folder (Optional)

A string value for the temporary folder to download and install the MSI windows installation file. Example:

windows_temp_folder => 'C:/Windows/Temp'
package_repo_ensure (Optional)

A flag for omitting the New Relic package repo. Meant for environments where the newrelic-infra package has been mirrored to another repo that's already present on the system (set it to absent to achieve this).

manage_repo (Optional)

A flag to prevent conflicts when using mirrors. Applicable for Ubuntu, Debian, RedHat, CentOS, Amazon, OracleLinux

Installing the infrastructure on-host integrations

In order to install integrations you can use the integrations class. The list of available integrations can be found here.

The newrelic_infra::integrations, has a parameter named integrations which should be a hash of:

  '<integration_package>' => { ensure => <state> },

The integrations package name is located in the Install and activate section of the individual integrations docs. As a convention, their name is the name of the service with the nri- prefix (nri-apache, nri-redis, etc.).

class { 'newrelic_infra::integrations':
  integrations => {
    'nri-mysql' => { ensure => present },
    'nri-redis' => { ensure => latest },
    'nri-rabbitmq' => { ensure => absent }

The source code for each integration is available on newrelic's github organization.

Removing newrelic-infra-integrations package and its bundled integrations

This only applies if you have the newrelic-infra-integrations package installed

If you want to remove the newrelic-infra-integrations package or any of the bundled integrations (nri-redis, nri-cassandra, nri-apache, nri-nginx, nri-mysql), add newrelic-infra-integrations as the first item of the integrations hash argument with an ensure => absent.

class { 'newrelic_infra::integrations':
  integrations => {
    'newrelic-infra-integrations' => { ensure => absent },
    'nri-mysql'                   => { ensure => absent },
    'nri-redis'                   => { ensure => latest },

Otherwise, you might get the following error:

Error: Execution of '/bin/rpm -e nri-mysql-1.1.5-1.x86_64' returned 1: error: Failed dependencies:
        nri-mysql is needed by (installed) newrelic-infra-integrations-0:1.7.0-1.x86_64

That is because the newrelic-infra-integrations has a dependency on those packages, so you need to remove it before removing any of the others.



  • Amazon Linux all versions
  • CentOS version 5 or higher
  • Debian version 7 ("Wheezy") or higher
  • Red Hat Enterprise Linux (RHEL) version 5 or higher
  • Ubuntu versions 12.04., 14.04., 16.04., and 18.04 (LTS versions)
  • Windows 2008, 2012, 2016 and 2019

Release to PuppetForge

To release a new version to PuppetForge follow this steps:


Should you need assistance with New Relic products, you are in good hands with several support diagnostic tools and support channels.

If the issue has been confirmed as a bug or is a feature request, file a GitHub issue.

Support Channels


At New Relic we take your privacy and the security of your information seriously, and are committed to protecting your information. We must emphasize the importance of not sharing personal data in public forums, and ask all users to scrub logs and diagnostic information for sensitive information, whether personal, proprietary, or otherwise.

We define “Personal Data” as any information relating to an identified or identifiable individual, including, for example, your name, phone number, post code or zip code, Device ID, IP address, and email address.

For more information, review New Relic’s General Data Privacy Notice.


We encourage your contributions to improve this project! Keep in mind that when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project.

If you have any questions, or to execute our corporate CLA (which is required if your contribution is on behalf of a company), drop us an email at

A note about vulnerabilities

As noted in our security policy, New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.

If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through HackerOne.

If you would like to contribute to this project, review these guidelines.

To all contributors, we thank you! Without your contribution, this project would not be what it is today.


infrastructure-agent-puppet is licensed under the Apache 2.0 License.