Skip to content

Commit a0f054e

Browse files
authored
feat: provide values file to nrdot agent type (#990)
1 parent 3459db4 commit a0f054e

28 files changed

+13
-4
lines changed

recipes/newrelic/infrastructure/super-agent/debian.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ install:
326326
fi
327327
- |
328328
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
329-
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf
329+
echo 'otel_exporter_otlp_endpoint: "staging-otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/nrdot-values.yaml
330330
elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
331331
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf
332332
else
@@ -356,6 +356,9 @@ install:
356356
else
357357
sed -i '/^\s*#\s*nr_otel_collector:/s/#//' /etc/newrelic-super-agent/config.yaml
358358
sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml
359+
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
360+
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
361+
fi
359362
fi
360363
361364
config_opamp:
@@ -427,4 +430,4 @@ install:
427430
428431
post_install:
429432
info: |2
430-
⚙️ The New Relic Super Agent configuration file can be found in /etc/newrelic-super-agent/config.yaml
433+
⚙️ The New Relic Super Agent configuration file can be found in /etc/newrelic-super-agent/config.yaml

recipes/newrelic/infrastructure/super-agent/rhel.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ install:
262262
fi
263263
- |
264264
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
265-
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf
265+
echo 'otel_exporter_otlp_endpoint: "staging-otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/nrdot-values.yaml
266266
elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
267267
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf
268268
else
@@ -292,6 +292,9 @@ install:
292292
else
293293
sed -i '/^\s*#\s*nr_otel_collector:/s/#//' /etc/newrelic-super-agent/config.yaml
294294
sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml
295+
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
296+
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
297+
fi
295298
fi
296299
297300
config_opamp:

recipes/newrelic/infrastructure/super-agent/suse.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ install:
216216
fi
217217
- |
218218
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
219-
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf
219+
echo 'otel_exporter_otlp_endpoint: "staging-otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/nrdot-values.yaml
220220
elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
221221
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf
222222
else
@@ -246,6 +246,9 @@ install:
246246
else
247247
sed -i '/^\s*#\s*nr_otel_collector:/s/#//' /etc/newrelic-super-agent/config.yaml
248248
sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml
249+
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
250+
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
251+
fi
249252
fi
250253
251254
config_opamp:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)