1.1.0
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-initNew 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-initDiff
-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-initExample 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
- test: add default image tags to k8s e2e by @gsanchezgavier in #1717
- feat: add public key url to examples by @danielorihuela in #1710
- chore(license): updated by @paologallinaharbur in #1722
- docs: capitalize Agent Control in README.md by @DavSanchez in #1721
control/pull/1723 - fix(e2e): add pub key url by @gsanchezgavier in #1734
- feat: report cd chart version in effective config by @danielorihuela in #1731
- chore: disable remote updates for e2e by default [NR-469778] by @sigilioso in #1735
- feat: improve wrong version error message by @danielorihuela in #1733
- feat: cleanup err messages [NR-369541] by @sigilioso in #1736
- fix: add more logs to http client by @vjripoll in #1712
- docs: update by @danielorihuela in #1740
- feat: directory support, map[string]yaml var type, migration by @DavSanchez in #1685
- feat(config-migrate): couple to infra-agent agent type, simplify by @DavSanchez in #1640
- chore: remove certificate validator by @gsanchezgavier in #1730
- fix: validate if agent-id collides with release-name by @sigilioso in #1742
- fix: correct variable ame for Flux weekly tests by @alvarocabanas in #1720
- test: run k8s integration test in parallel by @gsanchezgavier in #1747
- fix: infra config value quoting by @DavSanchez in #1746
- chore: rename NRDOT agent type by @DavSanchez in #1745
- refactor: remove file vartypes and ConfigurationPersister by @DavSanchez in #1743
- feat: validate signatures for AC configuration [NR-472450] by @sigilioso in #1744
Full Changelog: 1.0.0...1.1.0