Skip to content

Commit

Permalink
feat: provide values file to nrdot agent type (#990)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavSanchez authored Oct 25, 2023
1 parent 3459db4 commit a0f054e
Show file tree
Hide file tree
Showing 28 changed files with 13 additions and 4 deletions.
7 changes: 5 additions & 2 deletions recipes/newrelic/infrastructure/super-agent/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ 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/nrdot-values.yaml
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
else
Expand Down Expand Up @@ -356,6 +356,9 @@ install:
else
sed -i '/^\s*#\s*nr_otel_collector:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
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
fi
fi
config_opamp:
Expand Down Expand Up @@ -427,4 +430,4 @@ install:
post_install:
info: |2
⚙️ The New Relic Super Agent configuration file can be found in /etc/newrelic-super-agent/config.yaml
⚙️ The New Relic Super Agent configuration file can be found in /etc/newrelic-super-agent/config.yaml
5 changes: 4 additions & 1 deletion recipes/newrelic/infrastructure/super-agent/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ 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/nrdot-values.yaml
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
else
Expand Down Expand Up @@ -292,6 +292,9 @@ install:
else
sed -i '/^\s*#\s*nr_otel_collector:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
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
fi
fi
config_opamp:
Expand Down
5 changes: 4 additions & 1 deletion recipes/newrelic/infrastructure/super-agent/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ 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/nrdot-values.yaml
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
else
Expand Down Expand Up @@ -246,6 +246,9 @@ install:
else
sed -i '/^\s*#\s*nr_otel_collector:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/#//' /etc/newrelic-super-agent/config.yaml
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
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
fi
fi
config_opamp:
Expand Down

0 comments on commit a0f054e

Please sign in to comment.