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

Add a new E2E test to confirm that Elastic Agent component logs can be shipped to Fleet #2402

Closed
1 of 2 tasks
Tracked by #2428
cmacknz opened this issue Mar 27, 2023 · 5 comments · Fixed by #2965
Closed
1 of 2 tasks
Tracked by #2428
Assignees
Labels
Team:Elastic-Agent Label for the Agent team

Comments

@cmacknz
Copy link
Member

cmacknz commented Mar 27, 2023

What do we want to do and why?

Implement an E2E test that enrolls an agent in Fleet and ensures that logs are shipped to the expected set of logs datastreams. This tests automates enrolling an agent in Fleet and manually inspect the logs messages in the UI box below.

Screen Shot 2023-03-27 at 11 09 38 AM

  1. Enrolls an Elastic Agent in Fleet. The system integration and agent log monitoring should both be enabled by default.
  2. Confirms that log messages are populated for the logs-elastic_agent-default, logs-elastic_agent.filebeat-default and logs-elastic_agent.metricsbeat-default datastreams:
  • Ensure that the log message "Parsed configuration and determined agent is managed by Fleet" can be queried from logs-elastic_agent-default.
  • Ensure the log message metricbeat start running. can be queried from logs-elastic_agent.filebeat-default
  • Ensure the log message filebeat start running. can be queried from logs-elastic_agent.metricsbeat-default.
  1. Confirms that no error level logs or panics can be queried from any of the datastreams above.
  2. Unenrolls the Elastic Agent.
  3. Uninstalls the Elastic Agent.

The steps in this test touch a large surface area of the agent and Fleet product and would have automatically detected several recent regressions, notably:

Definition of done

  • E2E test using our new framework is in place to validate the mentioned scenario.
@cmacknz cmacknz added the Team:Elastic-Agent Label for the Agent team label Mar 27, 2023
@pierrehilbert pierrehilbert self-assigned this Mar 28, 2023
@cmacknz cmacknz mentioned this issue Mar 28, 2023
7 tasks
@cmacknz
Copy link
Member Author

cmacknz commented Apr 4, 2023

This test should also change the agent log level to debug and confirm that each process generates at least one debug log. We'll have to look at some representative logs to find a few that are always generated.

@amitkanfer
Copy link
Contributor

Marking this one as P0 as we're keep breaking our debug logs

@amitkanfer
Copy link
Contributor

@pierrehilbert what's blocking us here?

@pierrehilbert
Copy link
Contributor

Nothing anymore, just updated the status.

@fearful-symmetry
Copy link
Contributor

Currently blocked by a handful of bugs and rough edges in the testing framwork. The biggest actual blocker is here: elastic/elastic-agent-libs#127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants