Skip to content

Commit

Permalink
feat: create sub-agent directory
Browse files Browse the repository at this point in the history
  • Loading branch information
DavSanchez committed Nov 28, 2023
1 parent 17ab97c commit cc0204a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
8 changes: 5 additions & 3 deletions recipes/newrelic/infrastructure/super-agent/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,14 @@ install:
- |
# Remove old config location (to deprecate)
rm -f /etc/newrelic-super-agent/nrdot-values.yaml
# Create nr_otel_collector sub-agent dir
mkdir -p /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
echo 'otel_exporter_otlp_endpoint: "staging-otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
echo 'otel_exporter_otlp_endpoint: "staging-otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/fleet/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/agents.d/nr_otel_collector/values.yml
echo 'otel_exporter_otlp_endpoint: "otlp.eu01.nr-data.net:4317"' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values.yml
else
echo 'otel_exporter_otlp_endpoint: "otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
echo 'otel_exporter_otlp_endpoint: "otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values.yml
fi
config_supervisors:
Expand Down
8 changes: 5 additions & 3 deletions recipes/newrelic/infrastructure/super-agent/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,14 @@ install:
- |
# Remove old config location (to deprecate)
rm -f /etc/newrelic-super-agent/nrdot-values.yaml
# Create nr_otel_collector sub-agent dir
mkdir -p /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/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/agents.d/nr_otel_collector/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values.yml
else
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> //etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> //etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values.yml
fi
config_supervisors:
Expand Down
10 changes: 7 additions & 3 deletions recipes/newrelic/infrastructure/super-agent/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,16 @@ 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
# Create nr_otel_collector sub-agent dir
mkdir -p /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/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/agents.d/nr_otel_collector/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values.yml
else
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/agents.d/nr_otel_collector/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values.yml
fi
config_supervisors:
Expand Down

0 comments on commit cc0204a

Please sign in to comment.