Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Agent] Enable post install hooks #17197

Closed
michalpristas opened this issue Mar 24, 2020 · 1 comment · Fixed by #17241
Closed

[Agent] Enable post install hooks #17197

michalpristas opened this issue Mar 24, 2020 · 1 comment · Fixed by #17241
Assignees

Comments

@michalpristas
Copy link
Contributor

As this default magic does not have any index specified it then falls into default index specified in ES output and is in form metricbeat-version-date. This behavior is not wanted as beats should do what agent asks them to do.

I suggest we enhance our spec/{beat}.yml (files we are baking in on compile time and are not coming from fleet) with additional field post_install.
This field would look exactly like rules collection but with different rule set.

Sample should look like this

name: Metricbeat
cmd: metricbeat
args: ["-E", "setup.ilm.enabled=false"]
configurable: grpc
post_install:
- remove: 
    path: some/tricky/file
- chown:
    path: this/is/executable
    perms: 0770
rules:
- extract_list_items:
    path: datasources
    item: inputs
    to: inputsstreams

Benefit of having it here is that this is the single point of our codebase which is beats specific, solution is flexible enough to support different kind of crazy things and we can even introduce pre-run section as well when we need it with the same rule set (e.g cleanup data before run...)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ingest-management (Project:fleet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants