Skip to content

Commit

Permalink
Fix config setup
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarocabanas committed Sep 27, 2023
1 parent 898cb29 commit e5d6a79
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
16 changes: 8 additions & 8 deletions recipes/newrelic/infrastructure/super-agent/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,19 +336,19 @@ install:
cmds:
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" == "false" ] ; then
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
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*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
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*#\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
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*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
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
config_host_monitoring:
Expand Down
16 changes: 8 additions & 8 deletions recipes/newrelic/infrastructure/super-agent/rhel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,19 +272,19 @@ install:
cmds:
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" == "false" ] ; then
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
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*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
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*#\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
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*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
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
config_host_monitoring:
Expand Down
16 changes: 8 additions & 8 deletions recipes/newrelic/infrastructure/super-agent/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,19 +226,19 @@ install:
cmds:
- |
if [ "{{.NR_CLI_INFRA_AGENT}}" == "false" ] ; then
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
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*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
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*#\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
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*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
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
config_host_monitoring:
Expand Down

0 comments on commit e5d6a79

Please sign in to comment.