Skip to content

Commit

Permalink
feat: modify repo and path for OTLP endpoint conf
Browse files Browse the repository at this point in the history
  • Loading branch information
DavSanchez committed Nov 28, 2023
1 parent acef539 commit 17ab97c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
10 changes: 6 additions & 4 deletions recipes/newrelic/infrastructure/super-agent/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: super-agent
displayName: New Relic Super Agent
description: New Relic install recipe for the Super Agent
repository: https://github.com/newrelic/newrelic-supervisor
repository: https://github.com/newrelic/newrelic-super-agent

installTargets:
- type: host
Expand Down Expand Up @@ -328,12 +328,14 @@ install:
sed -i "/^OTEL_EXPORTER_OTLP_ENDPOINT/d" /etc/newrelic-super-agent/newrelic-super-agent.conf
fi
- |
# Remove old config location (to deprecate)
rm -f /etc/newrelic-super-agent/nrdot-values.yaml
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/agents.d/nr_otel_collector/values.yml
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
echo 'otel_exporter_otlp_endpoint: "otlp.eu01.nr-data.net:4317"' >> /etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
else
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf
echo 'otel_exporter_otlp_endpoint: "otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
fi
config_supervisors:
Expand Down
10 changes: 6 additions & 4 deletions recipes/newrelic/infrastructure/super-agent/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: super-agent
displayName: New Relic Super Agent
description: New Relic install recipe for the Super Agent
repository: https://github.com/newrelic/newrelic-supervisor
repository: https://github.com/newrelic/newrelic-super-agent

installTargets:
- type: host
Expand Down Expand Up @@ -265,12 +265,14 @@ install:
sed -i "/^OTEL_EXPORTER_OTLP_ENDPOINT/d" /etc/newrelic-super-agent/newrelic-super-agent.conf
fi
- |
# Remove old config location (to deprecate)
rm -f /etc/newrelic-super-agent/nrdot-values.yaml
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/agents.d/nr_otel_collector/values.yml
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
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
else
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> //etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
fi
config_supervisors:
Expand Down
10 changes: 6 additions & 4 deletions recipes/newrelic/infrastructure/super-agent/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: super-agent
displayName: New Relic Super Agent
description: New Relic install recipe for the Super Agent
repository: https://github.com/newrelic/newrelic-supervisor
repository: https://github.com/newrelic/newrelic-super-agent

installTargets:
- type: host
Expand Down Expand Up @@ -221,11 +221,11 @@ 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/agents.d/nr_otel_collector/values.yml
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
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
else
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/newrelic-super-agent.conf
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
fi
config_supervisors:
Expand Down Expand Up @@ -268,6 +268,8 @@ install:
sed -i '/^\s*#\s*headers:/s/#//' /etc/newrelic-super-agent/config.yaml
fi
- |
# Remove old config location (to deprecate)
rm -f /etc/newrelic-super-agent/nrdot-values.yaml
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
sed -i 's/\(endpoint: https:\/\/opamp.\).*/\1'"staging-service.newrelic.com\/v1\/opamp"'/' /etc/newrelic-super-agent/config.yaml
elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
Expand Down

0 comments on commit 17ab97c

Please sign in to comment.