Skip to content

Commit

Permalink
feat: update super-agent recipes to match new agent-id conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
DavSanchez authored and pjarugula committed Jan 29, 2024
1 parent 9082219 commit 6bd99de
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
18 changes: 9 additions & 9 deletions recipes/newrelic/infrastructure/super-agent/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,14 @@ install:
# Remove old config location (to deprecate)
rm -f /etc/newrelic-super-agent/nrdot-values.yaml
sed -i "/^OTEL_EXPORTER_OTLP_ENDPOINT/d" /etc/newrelic-super-agent/newrelic-super-agent.conf
# Create nr_otel_collector sub-agent dir
mkdir -p /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values
# Create nr-otel-collector sub-agent dir
mkdir -p /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
echo 'otel_exporter_otlp_endpoint: "staging-otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values/values.yml
echo 'otel_exporter_otlp_endpoint: "staging-otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yml
elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
echo 'otel_exporter_otlp_endpoint: "otlp.eu01.nr-data.net:4317"' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values/values.yml
echo 'otel_exporter_otlp_endpoint: "otlp.eu01.nr-data.net:4317"' >> /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yml
else
echo 'otel_exporter_otlp_endpoint: "otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values/values.yml
echo 'otel_exporter_otlp_endpoint: "otlp.nr-data.net:4317"' >> /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yml
fi
config_supervisors:
Expand All @@ -355,18 +355,18 @@ install:
fi
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ]; then
sed -i '/^\s*nr_infra_agent:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*nr-infra-agent:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr_infra_agent:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*nr-infra-agent:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/#//' /etc/newrelic-super-agent/config.yaml
fi
- |
if [ "{{.NR_CLI_NRDOT}}" = "false" ]; then
sed -i '/^\s*nr_otel_collector:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*nr-otel-collector:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr_otel_collector:/s/#//' /etc/newrelic-super-agent/config.yaml
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
fi
Expand Down
18 changes: 9 additions & 9 deletions recipes/newrelic/infrastructure/super-agent/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +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/values
# Create nr-otel-collector sub-agent dir
mkdir -p /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yml
elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yml
else
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> //etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> //etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yml
fi
config_supervisors:
Expand All @@ -291,18 +291,18 @@ install:
fi
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ] ; then
sed -i '/^\s*nr_infra_agent:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*nr-infra-agent:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr_infra_agent:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*nr-infra-agent:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/#//' /etc/newrelic-super-agent/config.yaml
fi
- |
if [ "{{.NR_CLI_NRDOT}}" = "false" ] ; then
sed -i '/^\s*nr_otel_collector:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*nr-otel-collector:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr_otel_collector:/s/#//' /etc/newrelic-super-agent/config.yaml
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
fi
Expand Down
18 changes: 9 additions & 9 deletions recipes/newrelic/infrastructure/super-agent/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,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/values
# Create nr-otel-collector sub-agent dir
mkdir -p /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values
if [ "{{.NEW_RELIC_REGION}}" = "STAGING" ]; then
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=staging-otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yml
elif [ "{{.NEW_RELIC_REGION}}" = "EU" ]; then
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.eu01.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yml
else
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr_otel_collector/values/values.yml
echo 'OTEL_EXPORTER_OTLP_ENDPOINT=otlp.nr-data.net:4317' >> /etc/newrelic-super-agent/fleet/agents.d/nr-otel-collector/values/values.yml
fi
config_supervisors:
Expand All @@ -246,18 +246,18 @@ install:
fi
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" = "false" ] ; then
sed -i '/^\s*nr_infra_agent:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*nr-infra-agent:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr_infra_agent:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*nr-infra-agent:/s/#//' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*#\s*agent_type: "newrelic\/com\.newrelic\.infrastructure_agent/s/#//' /etc/newrelic-super-agent/config.yaml
fi
- |
if [ "{{.NR_CLI_NRDOT}}" = "false" ] ; then
sed -i '/^\s*nr_otel_collector:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*nr-otel-collector:/s/^/#/' /etc/newrelic-super-agent/config.yaml
sed -i '/^\s*agent_type: "newrelic\/io\.opentelemetry\.collector/s/^/#/' /etc/newrelic-super-agent/config.yaml
else
sed -i '/^\s*#\s*nr_otel_collector:/s/#//' /etc/newrelic-super-agent/config.yaml
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
fi
Expand Down

0 comments on commit 6bd99de

Please sign in to comment.