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

Predefine agent policies in the Kibana config #655

Closed
Tracked by #108456
mtojek opened this issue Jan 19, 2022 · 2 comments · Fixed by #676
Closed
Tracked by #108456

Predefine agent policies in the Kibana config #655

mtojek opened this issue Jan 19, 2022 · 2 comments · Fixed by #676

Comments

@mtojek
Copy link
Contributor

mtojek commented Jan 19, 2022

Kibana Fleet team is going to deprecate and remove default agent policies in elastic/kibana#108456.

It means that the elastic-package stack up won't boot up eventually if the 8.0.0-SNAPSHOT 8.1.0-SNAPSHOT image is selected. The goal of this issue is to predefine policies in the kibana.config.yml (or a file close to it) and use them instead ones created by Elastic Agents.

@juliaElastic provided us also sample policies: here (thanks!)

@juliaElastic
Copy link

juliaElastic commented Jan 31, 2022

@joshdover
While testing the predefined policy changes in elastic-package, we discovered that elastic-agent has a fallback to is_default policy flag in case enrollment token is not specified: https://github.com/elastic/beats/blob/master/x-pack/elastic-agent/pkg/agent/cmd/container.go#L544

Elastic-agent uses the same docker-compose-stack.yml for all versions, so we have to use the default flags in kibana 8 config (setting policy id envvar would break pre-8 versions).

Any concerns with this? My only concern is that if we plan to remove the is_default flags completely, we would have to come back to elastic-agent again and find a solution that works with older versions too.

The alternative would be to either use different versions of docker-compose file, or use the preconfigured policies in pre-8 versions as well.

@mtojek
Copy link
Contributor Author

mtojek commented Jan 31, 2022

It looks like we're safe to merge the PR. The flag is_default worked well.

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

Successfully merging a pull request may close this issue.

2 participants