newrelic_infra
Version information
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
Add this module to your Puppetfile:
mod 'newrelic-newrelic_infra', '0.16.1'Learn more about managing modules with a PuppetfileDocumentation
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.
Usage
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',
}
Reference
Classes
Public classes
newrelic_infra::agent: Installs and configures the Infrastructure agent.
newrelic_infra::agent
Parameters
ensure
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
license_key
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:
https://myproxy.foo.com:8080http://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 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-integrationspackage 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.
Compatibility
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
- Watch the build with the version number in Github Actions: https://github.com/newrelic/infrastructure-agent-puppet/actions
Support
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
- New Relic Documentation: Comprehensive guidance for using our platform
- New Relic Community: The best place to engage in troubleshooting questions
- New Relic Developer: Resources for building a custom observability applications
- New Relic University: A range of online training for New Relic users of every level
- New Relic Technical Support 24/7/365 ticketed support. Read more about our Technical Support Offerings.
Privacy
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.
Contribute
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 opensource@newrelic.com.
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.
License
infrastructure-agent-puppet is licensed under the Apache 2.0 License.
newrelic-infra Puppet module CHANGELOG
0.13.0 (2021-09-16)
CHANGES:
- Removed support for CentOS versions 5 and 6 to comply with the newrelic infrastructure agent documentation.
0.12.0 (2021-08-26)
IMPROVEMENTS:
- Add manage_repo flag
- Ensure that when ensure is set to absent other variables are as well
- Extend metadata file with more OS versions
CHANGES:
- Removed support for Puppet version >= 4.0.0
0.11.0 (2021-07-05)
IMPROVEMENTS:
- Conforming to pdk standard for modules
- Added
download_proxyfor downloading package. (Introduces new module dependency oflwf-remote_file) - Add support for optional MSI download url via
windows_download_url - Add support for Oracle Linux
- Improve support for amazonLinux2, ensure continued support for amazonLinux
BUG FIXES:
- Fixed Windows uninstall issue if service is enabled.
- Fixed windows temp folder.
0.10.2 (2021-05-05)
BUG FIXES:
- Fixed Windows package "ensure" value to exclude 'latest'.
0.10.1 (2021-05-05)
IMPROVEMENTS:
- Removed obsolete future_parser.
BUG FIXES:
- Fixed Windows package "ensure" value.
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-aptmodule, This update changed the depencies requirement version of this module from>= 2.3.0 < 5.0.0version to>= 2.3.0 < 8.0.0. And forpuppetlabs-stdlibmodule, the requirements version has been updated from>= 4.2.0 < 5.0.0version 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_providerandtarball_version.
0.8.3 (2019-04-17)
BUG FIXES:
- Add missing
@in template
0.8.2 (2019-04-16)
BUG FIXES:
- Change the
to_yamlfunction for and explicit loop over thecustom_configsattribute, 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
aptbased systems where the first execution of the puppet module would fail withaptrelated errors.
0.8.0 (2019-04-08)
IMPROVEMENTS:
- Add support for installing individual integrations. The role
switches from the deprecated
newrelic-infra-integrationspackage (which only included 5 integrations), to thenri-*individual integration packages. Thenewrelic_infra::integrationsensureparameter was removed, a newintegrationsparameter 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_configsoption
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-infratonewrelic-newrelic_infrain 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_infratonewrelic-infrain 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 <= 9.0.0)
- puppetlabs-stdlib (>= 4.2.0 <= 9.0.0)
- lwf-remote_file (>= 1.1.3 < 2.0.1)
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2020 New Relic
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
