Integration configuration file specifications

A New Relic Infrastructure on-host integration built using the Integrations SDK contains at least three files: an executable file, a definition file, and a config file. This document explains specifications for the configuration file.

Access to this feature depends on your subscription level.

Create integration config file

The configuration file is a YAML-format file that specifies:

  • What executables to run
  • What parameters required to run them

When creating an integration, you must define at least one instance. If no instances are defined, the integration will not run.

Here's an example of a config file with one instance defined. Explanations of these fields are explained below the example.

integration_name: com.myorg.nginx
instances:
  - name: nginx1.myorg.com-metrics
    command: metrics
    arguments:
      status_url: http://127.0.0.1/status
    labels: 
      environment: production
      role: load_balancer
Config file example with two instances

Here's a config file example with two executables. For more information, refer to the config file field definitions.

integration_name: com.myorg.nginx
instances:
   - name: nginx1.myorg.com-metrics
     command: metrics
     arguments:
        status_url: http://127.0.0.1/status
     labels:
        environment: production
        role: load_balancer
   - name: nginx1.myorg.com-inventory
     command: metrics
     arguments:
        status_url: http://127.0.0.1/status
     labels:
        environment: production
        role: load_balancer

Config file field definitions

Config file field Description
integration_name

Required. This is the header and is used to identify which executables to run. This name must exactly match the name specified in the integration's definition file.

Recommendation: To ensure unique names, use reverse domain name notation.

name Required. This is the name for the specific invocation (instance) of the integration. This is used to help identify any log messages generated by this integration and is also useful for troubleshooting.
command

Required. This is the command to be executed. This must exactly match one of the unique alias names specified in the integration's definition file.

arguments

Optional. A YAML object where:

  • Keys: The argument name. Transformed to upper case when set as environment variable.
  • Values: The argument values. Passed through as is.

The arguments are made available to an integration as a set of environment variables.

Arguments in the config file cannot be capitalised and should use underscores to separate words.

labels

Optional. A YAML object where:

  • Keys: The label name.
  • Values: The defined label value.

Place and activate files

Follow New Relic's procedures to place the integration files and activate the integration.

For more help

Recommendations for learning more: