Skip to content

1.1.0

Choose a tag to compare

@DavSanchez DavSanchez released this 09 Oct 17:45
· 69 commits to main since this release
7e8e0ba

Breaking changes (Host-only)

Warning

This breaking change only impacts host setups. If you use Agent Control on Kubernetes there's no breaking change.

Host-based agent type definitions

The variable types file and map[string]file have been removed and the agent types for the Infrastructure Agent and the OpenTelemetry Collector have been updated to account for this change.

Now the two agent types use yaml and map[string]yaml (a newly introduced variable type) respectively for the variables that used the removed types. This means that previous configurations that relied on these variables having the content as a string might stop working properly if you update Agent Control for on-host.

Migrating

Most probably, you will only need to remove the | at the beginning of the config variable value (which delimited a YAML block string) to pass pure YAML content instead. See the examples below for the changes:

Example of migrating configs for the Infrastructure Agent
Old config

Note how the three variables (config_agent, config_integrations, config_logging) contain strings.

config_agent: |+
  enable_process_metrics: false
  status_server_enabled: true
  status_server_port: 18003
  license_key: {{NEW_RELIC_LICENSE_KEY}}

config_integrations:
  docker-config.yml: |
    integrations:
      - name: nri-docker
        when:
          feature: docker_enabled
          file_exists: /var/run/docker.sock
        interval: 15s

config_logging:
  discovered.yml: ""
  logging.yml: |
    logs:
      - name: alternatives.log
        file: /var/log/alternatives.log
        attributes:
          logtype: linux_alternatives
      - name: cloud-init.log
        file: /var/log/cloud-init.log
        attributes:
          logtype: linux_cloud-init
New config

Note how the three variables (config_agent, config_integrations, config_logging) now use pure YAML content.

NOTE: If you use the special syntax for interpolating environment variables on the Infrastructure Agent config you will have to quote it or the YAML format will break. The example below exposes how to do so.

config_agent:
  enable_process_metrics: false
  status_server_enabled: true
  status_server_port: 18003
  license_key: "{{NEW_RELIC_LICENSE_KEY}}" # Note the quoting!

config_integrations:
  docker-config.yml:
    integrations:
      - name: nri-docker
        when:
          feature: docker_enabled
          file_exists: /var/run/docker.sock
        interval: 15s

config_logging:
  discovered.yml: {}
  logging.yml:
    logs:
      - name: alternatives.log
        file: /var/log/alternatives.log
        attributes:
          logtype: linux_alternatives
      - name: cloud-init.log
        file: /var/log/cloud-init.log
        attributes:
          logtype: linux_cloud-init
Diff
-config_agent: |+
+config_agent:
   enable_process_metrics: false
   status_server_enabled: true
   status_server_port: 18003
-  license_key: {{NEW_RELIC_LICENSE_KEY}}
+  license_key: "{{NEW_RELIC_LICENSE_KEY}}" # Note the quoting!
 
 config_integrations:
-  docker-config.yml: |
+  docker-config.yml:
     integrations:
       - name: nri-docker
         when:
           feature: docker_enabled
           file_exists: /var/run/docker.sock
         interval: 15s
 
 config_logging:
-  discovered.yml: ""
-  logging.yml: |
+  discovered.yml: {}
+  logging.yml:
     logs:
       - name: alternatives.log
         file: /var/log/alternatives.log
         attributes:
           logtype: linux_alternatives
       - name: cloud-init.log
         file: /var/log/cloud-init.log
         attributes:
           logtype: linux_cloud-init
Example of migrating configs for the New Relic Distribution for the OpenTelemetry Collector
Old config

Note the variable config contains a string.

config: |
  # The following environment variables require manual modification:
  # - NEW_RELIC_LICENSE_KEY: New Relic ingest key.

  # If the collector is not installed through a package manager, the following
  # environment variables need to be set:
  # - NEW_RELIC_MEMORY_LIMIT_MIB: Maximum amount of memory to be used. (default: 100)
  # - OTEL_EXPORTER_OTLP_ENDPOINT: New Relic OTLP endpoint to export metrics to (see: https://docs.newrelic.com/docs/opentelemetry/best-practices/opentelemetry-otlp/)

  # Keep host monitoring configuration in sync with: https://github.com/newrelic/newrelic-opentelemetry-examples/blob/main/other-examples/collector/host-monitoring/k8s/collector.yaml

  exporters:
    logging:
    otlphttp:
      endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT}
      headers:
        api-key: ${NEW_RELIC_LICENSE_KEY}
New config

Note how the variable config now uses pure YAML content.

config:
  # The following environment variables require manual modification:
  # - NEW_RELIC_LICENSE_KEY: New Relic ingest key.

  # If the collector is not installed through a package manager, the following
  # environment variables need to be set:
  # - NEW_RELIC_MEMORY_LIMIT_MIB: Maximum amount of memory to be used. (default: 100)
  # - OTEL_EXPORTER_OTLP_ENDPOINT: New Relic OTLP endpoint to export metrics to (see: https://docs.newrelic.com/docs/opentelemetry/best-practices/opentelemetry-otlp/)

  # Keep host monitoring configuration in sync with: https://github.com/newrelic/newrelic-opentelemetry-examples/blob/main/other-examples/collector/host-monitoring/k8s/collector.yaml

  exporters:
    logging:
    otlphttp:
      endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT}
      headers:
        api-key: ${NEW_RELIC_LICENSE_KEY}
Diff
-config: |
+config:
   # The following environment variables require manual modification:
   # - NEW_RELIC_LICENSE_KEY: New Relic ingest key.
 
   # If the collector is not installed through a package manager, the following
   # environment variables need to be set:
   # - OTEL_EXPORTER_OTLP_ENDPOINT: New Relic OTLP endpoint to export metrics to (see: https://docs.newrelic.com/docs/opentelemetry/best-practices/opentelemetry-otlp/)
 
   # Keep host monitoring configuration in sync with: https://github.com/newrelic/newrelic-opentelemetry-examples/blob/main/other-examples/collector/host-monitoring/k8s/collector.yaml
 
   exporters:
     logging:
     otlphttp:
       endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT}
       headers:
         api-key: ${NEW_RELIC_LICENSE_KEY}

The configuration templates have been updated in the Fleet Control UI guiding new configurations to use the updated formats.

Rationale

The general usage of these variables (rendering the string contents by writing to the file system and getting the resulting path) is superseded by the addition of a filesystem field for an agent type's on_host deployment that defines what filesystem entries (i.e. directories with files) to create. To support typical use cases, the variable type map[string]yaml has been introduced. See the filesystem section in INTEGRATING_AGENTS.md for details.

What's Changed

Full Changelog: 1.0.0...1.1.0