Read on to learn how to use New Relic's Chef recipes to install and configure New Relic's infrastructure agent. For instructions on how to use Chef recipes, see the Chef documentation.
The New Relic cookbook is available from the public Chef Supermarket. This is a community-supported effort.
Compatibility and requirements
The Infrastructure Chef recipe has the following requirements:
- Chef versions 12 or higher
- Supports all operating systems compatible with the infrastructure agent
Chef recipes
Infrastructure monitoring has one default recipe: default
. Include this recipe to install and configure the infrastructure agent. If this recipe detects an unsupported platform or version, the Chef run fails. Configuration depends on your specific setup and standards.
Chef attributes
The default
recipe supplies the following Chef attributes:
Use the basic recipe
The New Relic cookbook is available from the public Chef Supermarket. To install and configure New Relic's infrastructure agent using Chef:
Add the
newrelic-infra
dependency in your own Chefmetadata.rb
orBerksfile
.Set the New Relic attribute. For example, add the following to your
recipes/default.rb
:default['newrelic_infra']['config']['license_key'] = 'YOUR_LICENSE_KEY'Optional: To control version usage and updating, customize the recipe with Chef attributes.
Include the default New Relic recipe by using
include_recipe ‘newrelic-infra::default'
or by adding the recipe to your run list.