4
4
name : super-agent
5
5
displayName : New Relic Super Agent
6
6
description : New Relic install recipe for the Super Agent
7
- repository : https://github.com/newrelic/newrelic-supervisor
7
+ repository : https://github.com/newrelic/newrelic-super-agent
8
8
9
9
installTargets :
10
10
- type : host
@@ -220,16 +220,24 @@ install:
220
220
sed -i "/^OTEL_EXPORTER_OTLP_ENDPOINT/d" /etc/newrelic-super-agent/newrelic-super-agent.conf
221
221
fi
222
222
- |
223
+ # Remove old config location (to deprecate)
224
+ rm -f /etc/newrelic-super-agent/nrdot-values.yaml
225
+ # Create nr_otel_collector sub-agent dir
226
+ mkdir -p /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector
223
227
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
224
- echo 'otel_exporter_otlp_endpoint: " staging-otlp.nr-data.net:4317" ' >> /etc/newrelic-super-agent/nrdot- values.yaml
228
+ echo 'OTEL_EXPORTER_OTLP_ENDPOINT= staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/ values.yml
225
229
elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
226
- echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf
230
+ echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values.yml
227
231
else
228
- echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf
232
+ echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values.yml
229
233
fi
230
234
231
235
config_supervisors :
232
236
cmds :
237
+ - |
238
+ # Remove values_file keys from config.yaml
239
+ sed -i '/^\s*values_file:/d' /etc/newrelic-super-agent/config.yaml
240
+ sed -i '/^\s*#\s*values_file:/d' /etc/newrelic-super-agent/config.yaml
233
241
- |
234
242
if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ] && [ "{{.NR_CLI_NRDOT}}" = "false" ] ; then
235
243
sed -i '/^\s*agents:/s/^/#/' /etc/newrelic-super-agent/config.yaml
@@ -251,9 +259,6 @@ install:
251
259
else
252
260
sed -i '/^\s*#\s*nr_otel_collector:/s/#//' /etc/newrelic-super-agent/config.yaml
253
261
sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml
254
- if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
255
- 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
256
- fi
257
262
fi
258
263
259
264
config_opamp :
@@ -271,6 +276,8 @@ install:
271
276
sed -i '/^\s*#\s*headers:/s/#//' /etc/newrelic-super-agent/config.yaml
272
277
fi
273
278
- |
279
+ # Remove old config location (to deprecate)
280
+ rm -f /etc/newrelic-super-agent/nrdot-values.yaml
274
281
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
275
282
sed -i 's/\(endpoint: https:\/\/opamp.\).*/\1'"staging-service.newrelic.com\/v1\/opamp"'/' /etc/newrelic-super-agent/config.yaml
276
283
elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
0 commit comments