Integration file structure and placement

The New Relic Infrastructure Integrations SDK lets you create a custom integration for reporting custom host and service data. This document gives an overview of how to create an integration, where to place the required integration files, and how to activate your integration. New Relic also provides Go language integration building tools and a tutorial.

Access to this feature depends on your subscription level.

Create integration files

Before you build an integration, verify you meet the compatibility and requirements.

An integration must have at least these three files:

  • An executable file, written in any language, that export JSON data in a format expected by the Infrastructure agent.
  • A definition file (YAML format) that provides descriptive information about the integration, such as: the version of the JSON protocol it supports, a list of commands it can execute, and arguments that it accepts.
  • A configuration file (YAML format) that specifies which executables to run and the parameters required to run them.

For Go language build tools and a tutorial for creating these files, see Build resources.

Name and place files

Here are guidelines for naming and placing your integration files:

Integration file Comments
Executable file and definition file

Recommendation: Give the executable file and definition file the same naming scheme. For example, if the executable file is your_integration, name the definition file your_integration-definition.yml.

Place the executable file and definition file in this directory:

  • Linux:

    /var/db/newrelic-infra/custom-integrations
  • Windows:

    C:/Program Files/New Relic/newrelic-infra/custom-integrations
Configuration file

Recommendation: Give the configuration file the same naming scheme as the executable file and definition file. For example, if the executable file is your_integration, name the configuration file your_integration-config.yml.

Place the configuration file in this directory:

  • Linux:

    /etc/newrelic-infra/integrations.d/
  • Windows:

    C:/Program Files/New Relic/newrelic-infra/integrations.d

Activate the integration

To activate the integration:

  1. Place the files in the recommended directories.
  2. Start or restart the Infrastructure agent.

For more help

Recommendations for learning more: