Skip to content

Commit 9fd1662

Browse files
Move filelog removal to the main super-agent recipe to not send any logs if NRI_HOST_MONITORING is 'newrelic' (#996)
1 parent 54e5dcc commit 9fd1662

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

recipes/newrelic/infrastructure/super-agent/debian.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ install:
399399
else
400400
if [ -f /etc/nr-otel-collector/config.yaml ]; then
401401
sed -i 's/\<otlp, hostmetrics\>/otlp/g' /etc/nr-otel-collector/config.yaml
402+
sed -i 's/\<otlp, filelog\>/otlp/g' /etc/nr-otel-collector/config.yaml
402403
fi
403404
fi
404405

recipes/newrelic/infrastructure/super-agent/logs/linux-logs.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,7 @@ install:
132132
if [ "{{.NR_CLI_HOST_MONITORING_SOURCE}}" != "otel" ]; then
133133
mkdir -p "/etc/newrelic-infra/logging.d"
134134
touch /etc/newrelic-infra/logging.d/logging.yml;
135-
touch /etc/newrelic-infra/logging.d/discovered.yml;
136-
if [ -f /etc/nr-otel-collector/config.yaml ]; then
137-
sed -i 's/\<otlp, filelog\>/otlp/g' /etc/nr-otel-collector/config.yaml
138-
fi
135+
touch /etc/newrelic-infra/logging.d/discovered.yml;
139136
fi
140137
141138
setup:

recipes/newrelic/infrastructure/super-agent/rhel.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ install:
336336
else
337337
if [ -f /etc/nr-otel-collector/config.yaml ]; then
338338
sed -i 's/\<otlp, hostmetrics\>/otlp/g' /etc/nr-otel-collector/config.yaml
339+
sed -i 's/\<otlp, filelog\>/otlp/g' /etc/nr-otel-collector/config.yaml
339340
fi
340341
fi
341342

recipes/newrelic/infrastructure/super-agent/suse.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ install:
291291
else
292292
if [ -f /etc/nr-otel-collector/config.yaml ]; then
293293
sed -i 's/\<otlp, hostmetrics\>/otlp/g' /etc/nr-otel-collector/config.yaml
294+
sed -i 's/\<otlp, filelog\>/otlp/g' /etc/nr-otel-collector/config.yaml
294295
fi
295296
fi
296297

0 commit comments

Comments
 (0)