Skip to content

Commit

Permalink
[Elastic Agent] Disable modules.d in metricbeat (#27860)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ruflin committed Sep 20, 2021
1 parent 01bd66d commit 41f17ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion x-pack/elastic-agent/pkg/agent/program/supported.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions x-pack/elastic-agent/spec/metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ args: [
"-E", "setup.template.enabled=false",
"-E", "management.enabled=true",
"-E", "logging.level=debug",
"-E", "gc_percent=${METRICBEAT_GOGC:100}"
"-E", "gc_percent=${METRICBEAT_GOGC:100}",
"-E", "metricbeat.config.modules.enabled=false"
]
artifact: beats/metricbeat
restart_on_output_change: true
post_install:
- move_file:
path: "modules.d/system.yml"
target: "modules.d/system.yml.disabled"
rules:
- fix_stream: {}
- inject_index:
Expand Down

0 comments on commit 41f17ab

Please sign in to comment.