From 78da673dbf689ba962376fd315db7e42998f8117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Wed, 11 Oct 2023 17:23:07 +0100 Subject: [PATCH] feat: provide values file to nrdot agent type --- recipes/newrelic/infrastructure/super-agent/debian.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes/newrelic/infrastructure/super-agent/debian.yml b/recipes/newrelic/infrastructure/super-agent/debian.yml index bd31d9a9f..f1aab65d6 100644 --- a/recipes/newrelic/infrastructure/super-agent/debian.yml +++ b/recipes/newrelic/infrastructure/super-agent/debian.yml @@ -326,7 +326,7 @@ install: fi - | if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then - echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf + echo 'otel_exporter_otlp_endpoint: staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/nrdot-values.yaml elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf else @@ -356,6 +356,9 @@ install: else sed -i '/^\s*#\s*nr_otel_collector:/s/#//' /etc/newrelic-super-agent/config.yaml sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml + if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then + sed -i 's/nr_otel_collector:/nr_otel_collector:\n values_file: "\/etc\/newrelic-super-agent\/nrdot-values\.yaml"/' /etc/newrelic-super-agent/config.yaml + fi fi config_opamp: