newrelic_infra
Version information
This version is compatible with:
- Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 3.0.0 < 6.0.0
- Debian,CentOS,OpenSUSE,RedHat,SLES,Ubuntu,Windows
Start using this module
Documentation
newrelic-infra Puppet module
Description
This module installs and configures the New Relic Infrastructure agent.
Setup
What newrelic-infra affects
- Adds the New Relic Infrastructure package repository source
- Installs and configures the New Relic Infrastructure agent
Beginning with newrelic-infra
Declare the main ::agent
class.
Usage
All interactions with newrelic-infra
will be done through the main agent
class.
Installing the Infrastructure agent
class { 'newrelic_infra::agent':
ensure => 'latest',
license_key => 'YOUR_LICENSE_KEY',
}
Reference
Classes
Public Classes
newrelic_infra::agent
: Installs and configures the Infrastructure agent.
newrelic_infra::agent
Parameters
ensure
Specifies the Infrastructure agent ensure status.
Valid values include:
'latest'
- (default) Installs the latest agent version'absent'
- Uninstalls the agent- string - String containing a specific version to pin
license_key
Specifies the New Relic license key to use.
display_name
Optional. Override the auto-generated hostname for reporting.
verbose
Optional. Enables verbose logging for the agent when set the value with 1, the 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. Set the proxy server the agent should use. Examples:
https://myproxy.foo.com:8080
http://10.10.254.254
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 the default provider 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:/users/Administrator/Downloads'
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 to absent
to achieve this)
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. They use the following convention,
name of the service with the nri-
prefix (nri-apache
, nri-redis
, ...).
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
NOTE This only applies if you have the newrelic-infra-integrations
package installed
If you had installed the newrelic-infra-integrations
package,
could be because you were using the previous versions of this module, or you
installed it some other way; and you want to do some cleanup by
removing it or any of the following integrations (the ones that came bundle
with it):
- nri-redis
- nri-cassandra
- nri-apache
- nri-nginx
- nri-mysql
You have to 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 first, before removing any of the other.
Limitations
Platforms
- 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:
- Update the CHANGELOG.md
- Increase the version in metadata.json
- Create a new Github release: the release process will be executed in TravisCI
License
Copyright (c) 2019 New Relic, Inc. All rights reserved.
newrelic-infra Puppet module CHANGELOG
0.10.0 (2019-08-12)
IMPROVEMENTS:
- Add support for optional MSI installation directory parameter for downloaded windows installation file.
- The requirements modules has been updated for
puppet-labs-apt
module, This update changed the depencies requirement version of this module from>= 2.3.0 < 5.0.0
version to>= 2.3.0 < 8.0.0
. And forpuppetlabs-stdlib
module, the requirements version has been updated from>= 4.2.0 < 5.0.0
version to>= 4.2.0 < 7.0.0
.
0.9.0 (2019-05-27)
IMPROVEMENTS:
- Add support for installing the agent in different linux architecture from the
tarballs. For this purppose two new attributes were added
newrelic_infra::agent
,linux_provider
andtarball_version
.
0.8.3 (2019-04-17)
BUG FIXES:
- Add missing
@
in template
0.8.2 (2019-04-16)
BUG FIXES:
- Change the
to_yaml
function for and explicit loop over thecustom_configs
attribute, that way avoiding extra trailing whitespaces in the resulting yaml that caused the config options being ignored.
0.8.1 (2019-04-12)
BUG FIXES:
- Fixes duplicate creation of newrelic infra repo when using both the agent and integrations module.
- Fixes and issue with
apt
based systems where the first execution of the puppet module would fail withapt
related errors.
0.8.0 (2019-04-08)
IMPROVEMENTS:
- Add support for installing individual integrations. The role
switches from the deprecated
newrelic-infra-integrations
package (which only included 5 integrations), to thenri-*
individual integration packages. Thenewrelic_infra::integrations
ensure
parameter was removed, a newintegrations
parameter was added for specifying individual integrations.
0.7.1 (2019-01-14)
IMPROVEMENTS:
BUG FIXES:
- Fix installation in Windows when the default provider for puppet was
set to something different than
windows
. Now the provider for installing the package can be specify withwindows_provider
, when not set, it defaults towindows
0.7.0 (2018-11-16)
IMPROVEMENTS:
- Add Support for Centos 5
0.6.1 (2018-11-08)
BUG FIXES:
- Specify correct version in metadata.json
0.6.0 (2018-11-02)
IMPROVEMENTS:
- Add Support for Ubuntu 18.04 (bionic)
- Add Support for Windows
0.5.1 (2018-06-04)
BUG FIXES:
- Use Upstart for RHEL 6 and Amazon
0.5.0 (2018-05-23)
IMPROVEMENTS:
- Add
custom_configs
option
0.4.0 (2018-05-16)
IMPROVEMENTS:
- Prevent failure on Oracle Linux
0.3.1 (2018-02-25)
IMPROVEMENTS:
- Add syntax checking to Rake tasks
- Update version compatibility metadata
0.3.0 (2018-02-23)
IMPROVEMENTS:
- Change name from
newrelic-infra
tonewrelic-newrelic_infra
in manifest.json - Specify upper limit to Puppet version in manifest.json
- Specify upper limit to dependencies in manfiest.json
- Add metadata-json-lint to lint metadata.json
- Add Rakefile and Rake tasks for linting
- Add SLES support
0.2.0 (2018-02-09)
IMPROVEMENTS:
- Change name from
newrelic_infra
tonewrelic-infra
in manifest.json - Add Travis CI
- Add puppet-lint
0.1.0 (2017-11-27)
IMPROVEMENTS:
- A CHANGELOG
- Updated version information
- Simplified test kitchen setup
Dependencies
- puppetlabs-apt (>= 2.3.0 < 8.0.0)
- puppetlabs-stdlib (>= 4.2.0 < 7.0.0)