Skip to content

Dump policy using elastic-agent #671

@mtojek

Description

@mtojek

Related: #666

This problem strikes back:

Attaching to elastic-package-stack_elastic-agent_1
�[36melastic-agent_1              |�[0m Policy selected for enrollment:  2016d7cc-135e-5583-9758-3ba01f5a06e5
�[36melastic-agent_1              |�[0m 2022-01-26T17:27:04.290Z	WARN	[tls]	tlscommon/tls_config.go:98	SSL/TLS verifications disabled.
�[36melastic-agent_1              |�[0m 2022-01-26T17:27:05.283Z	INFO	cmd/enroll_cmd.go:454	Starting enrollment to URL: http://fleet-server:8220/
�[36melastic-agent_1              |�[0m Successfully enrolled the Elastic Agent.
�[36melastic-agent_1              |�[0m 2022-01-26T17:27:06.077Z	INFO	cmd/enroll_cmd.go:252	Elastic Agent might not be running; unable to trigger restart
�[36melastic-agent_1              |�[0m Error: could not read configuration file /usr/share/elastic-agent/state/elastic-agent.yml: yaml: line 47: could not find expected ':'
�[36melastic-agent_1              |�[0m For help, please see our troubleshooting guide at https://www.elastic.co/guide/en/fleet/7.16/fleet-troubleshooting.html

We can either use elastic-agent diagnostics or simply dump the mentioned file. In both cases, there is a risk that the policy will contain sensitive data that even our developers shouldn't see. Consider redacting or trimming.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions