Skip to content

Commit 41f17ab

Browse files
authored
[Elastic Agent] Disable modules.d in metricbeat (#27860)
Currently when Elastic Agent is started, on post-install of metricbeat the system.yml file in the modules.d directoy is renamed to system.yml.disabled to make sure it is not run. It turns out there might be some edge cases where this does not work. To not rely on renaming of files, instead the modules are fully disabled. Closes #27857
1 parent 01bd66d commit 41f17ab

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

x-pack/elastic-agent/pkg/agent/program/supported.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/elastic-agent/spec/metricbeat.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ args: [
55
"-E", "setup.template.enabled=false",
66
"-E", "management.enabled=true",
77
"-E", "logging.level=debug",
8-
"-E", "gc_percent=${METRICBEAT_GOGC:100}"
8+
"-E", "gc_percent=${METRICBEAT_GOGC:100}",
9+
"-E", "metricbeat.config.modules.enabled=false"
910
]
1011
artifact: beats/metricbeat
1112
restart_on_output_change: true
12-
post_install:
13-
- move_file:
14-
path: "modules.d/system.yml"
15-
target: "modules.d/system.yml.disabled"
1613
rules:
1714
- fix_stream: {}
1815
- inject_index:

0 commit comments

Comments
 (0)