From 17ab97c485a5d80d0e8013441242e8c5f678aad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez?= Date: Tue, 28 Nov 2023 12:44:44 +0000 Subject: [PATCH] feat: modify repo and path for OTLP endpoint conf --- recipes/newrelic/infrastructure/super-agent/debian.yml | 10 ++++++---- recipes/newrelic/infrastructure/super-agent/rhel.yml | 10 ++++++---- recipes/newrelic/infrastructure/super-agent/suse.yml | 10 ++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/recipes/newrelic/infrastructure/super-agent/debian.yml b/recipes/newrelic/infrastructure/super-agent/debian.yml index 53ce2e098..629ab579d 100644 --- a/recipes/newrelic/infrastructure/super-agent/debian.yml +++ b/recipes/newrelic/infrastructure/super-agent/debian.yml @@ -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 @@ -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: diff --git a/recipes/newrelic/infrastructure/super-agent/rhel.yml b/recipes/newrelic/infrastructure/super-agent/rhel.yml index 5657f07b2..1cbc6511b 100644 --- a/recipes/newrelic/infrastructure/super-agent/rhel.yml +++ b/recipes/newrelic/infrastructure/super-agent/rhel.yml @@ -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 @@ -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: diff --git a/recipes/newrelic/infrastructure/super-agent/suse.yml b/recipes/newrelic/infrastructure/super-agent/suse.yml index eac3f1ddf..4377ba2b5 100644 --- a/recipes/newrelic/infrastructure/super-agent/suse.yml +++ b/recipes/newrelic/infrastructure/super-agent/suse.yml @@ -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 @@ -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: @@ -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