Read on to learn how to use New Relic's Chef recipes to install and configure New Relic's infrastructure agent. For how to use Chef recipes, see the Chef docs.
The New Relic cookbook is available in the Chef Supermarket. It will help you scale your New Relic observability efforts. To achieve this, it uses the New Relic CLI and our open install repository. This is a community-supported effort.
Our Chef recipe has the following requirements:
- Chef versions 15 or higher
- 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 16.04., 18.04., 20.04* (LTS versions)
- Windows Server 2008, 2012, 2016, and 2019, and their service packs.
- SUSE Linux Enterprise 11, 12
Infrastructure monitoring has one default recipe:
default. Include this recipe to install and configure the infrastructure agent, logs, and . If this recipe detects an unsupported platform or version, the Chef run fails. Configuration depends on your specific setup and standards.
This cookbook will always install the latest released version of the New Relic agent and doesn't support installing older versions.
newrelic_install resource manager will instrument New Relic using our guided install, with minimal configuration. It will:
- Set any attributes necessary for your desired configuration
- Add the
newrelic-install::defaultrecipe your run list
newrelic_install 'install' doaction :installnew_relic_api_key node['newrelic_install']['NEW_RELIC_API_KEY']new_relic_account_id node['newrelic_install']['NEW_RELIC_ACCOUNT_ID']env node['newrelic_install']['env']targets node['newrelic_install']['targets']end
default recipe supplies the following Chef attributes:
Your New Relic user key.
List of targeted installs to run on hosts. Available options are:
The data center region for your organization (
Sets the proxy server the agent should use.
Specifies command output verbosity
Supported values include
Key value pair tags added through custom attributes.
Sets the timeout in seconds for New Relic installations. Defaults to