@@ -67,6 +67,7 @@ install:
67
67
- task : install_super_agent
68
68
- task : update_otel_license_key
69
69
- task : config_supervisors
70
+ - task : config_fleet_id
70
71
- task : config_opamp
71
72
- task : config_host_monitoring
72
73
- task : update_otel_mem_limit
@@ -247,11 +248,11 @@ install:
247
248
cmds :
248
249
- |
249
250
if [ "{{.NR_CLI_NRDOT}}" != "false" ]; then
250
- if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
251
+ if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
251
252
sed -i "s/endpoint: .*$/endpoint: staging-otlp.nr-data.net:4317/g" /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yaml
252
- elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
253
+ elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
253
254
sed -i "s/endpoint: .*$/endpoint: otlp.eu01.nr-data.net:4317/g" /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yaml
254
- else
255
+ else
255
256
sed -i "s/endpoint: .*$/endpoint: otlp.nr-data.net:4317/g" /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yaml
256
257
fi
257
258
fi
@@ -265,22 +266,30 @@ install:
265
266
cp /etc/newrelic-super-agent/examples/super-agent-config-all-agents.yaml /etc/newrelic-super-agent/config.yaml
266
267
fi
267
268
- |
268
- if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ] ; then
269
+ if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ]; then
269
270
sed -i '/^\s*nr-infra-agent:/s/^/#/' /etc/newrelic-super-agent/config.yaml
270
271
sed -i '/^\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/^/#/' /etc/newrelic-super-agent/config.yaml
271
272
else
272
273
sed -i '/^\s*#\s*nr-infra-agent:/s/#//' /etc/newrelic-super-agent/config.yaml
273
274
sed -i '/^\s*#\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/#//' /etc/newrelic-super-agent/config.yaml
274
275
fi
275
276
- |
276
- if [ "{{.NR_CLI_NRDOT}}" = "false" ] ; then
277
+ if [ "{{.NR_CLI_NRDOT}}" = "false" ]; then
277
278
sed -i '/^\s*nr-otel-collector:/s/^/#/' /etc/newrelic-super-agent/config.yaml
278
279
sed -i '/^\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/^/#/' /etc/newrelic-super-agent/config.yaml
279
280
else
280
281
sed -i '/^\s*#\s*nr-otel-collector:/s/#//' /etc/newrelic-super-agent/config.yaml
281
282
sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml
282
283
fi
283
284
285
+ config_fleet_id :
286
+ cmds :
287
+ - |
288
+ if [ ! -z "{{.NR_CLI_FLEET_ID}}" ] ; then
289
+ sed -i 's/^#\s*fleet_id:/fleet_id:/g' /etc/newrelic-super-agent/config.yaml
290
+ sed -i 's/fleet_id: FLEET_ID_HERE/fleet_id: {{.NR_CLI_FLEET_ID}}/g' /etc/newrelic-super-agent/config.yaml
291
+ fi
292
+
284
293
config_opamp :
285
294
cmds :
286
295
- |
@@ -296,8 +305,6 @@ install:
296
305
sed -i '/^\s*#\s*headers:/s/#//' /etc/newrelic-super-agent/config.yaml
297
306
fi
298
307
- |
299
- # Remove old config location (to deprecate)
300
- rm -f /etc/newrelic-super-agent/nrdot-values.yaml
301
308
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
302
309
sed -i 's/\(endpoint: https:\/\/opamp.\).*/\1'"staging-service.newrelic.com\/v1\/opamp"'/' /etc/newrelic-super-agent/config.yaml
303
310
elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
0 commit comments