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

[Logs onboarding] Generate elastic-agent.yml file for system logs #162972

Merged

Conversation

yngrdyn
Copy link
Contributor

@yngrdyn yngrdyn commented Aug 2, 2023

Closes #154929.

This PR along with #162654, #162706 and #162600 completes the work required for collect system logs.

Changes

  • ObservabilityOnboardingType now could be logFiles | systemLogs. This help us to identify (without changing the script) whether we need to retrieve the yaml configuration for customLogs or for systemLogs.
  • Added generateSystemLogsYml which generates a specific configuration for system logs.
  • get_has_logs.ts was modified so we are querying the proper index depending on the type of logs.

Demo

Screen.Recording.2023-08-02.at.17.58.58.mov

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Aug 2, 2023

/oblt-deploy

1 similar comment
@yngrdyn
Copy link
Contributor Author

yngrdyn commented Aug 2, 2023

/oblt-deploy

@yngrdyn yngrdyn force-pushed the 154929-logs-onboarding-system-logs-server-routes branch from 84908dc to b4d0e91 Compare August 2, 2023 15:32
@yngrdyn yngrdyn force-pushed the 154929-logs-onboarding-system-logs-server-routes branch from b4d0e91 to c63e8d3 Compare August 2, 2023 15:47
@yngrdyn yngrdyn force-pushed the 154929-logs-onboarding-system-logs-server-routes branch from 58d1f92 to 6090745 Compare August 2, 2023 15:55
@yngrdyn yngrdyn marked this pull request as ready for review August 2, 2023 16:07
@yngrdyn yngrdyn requested a review from a team as a code owner August 2, 2023 16:07
@yngrdyn yngrdyn added the release_note:skip Skip the PR/issue when compiling release notes label Aug 2, 2023
Copy link
Contributor

@ogupte ogupte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, a few questions.

dataset,
namespace,
type,
state: savedObservabilityOnboardingState.state,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think we need to pass in the type separately since it is already in the saved object?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to pass the type explicitly

@@ -40,7 +40,7 @@ export function InstallElasticAgent() {
const [elasticAgentPlatform, setElasticAgentPlatform] =
useState<ElasticAgentPlatform>('linux-tar');

const datasetName = 'elastic-agent';
const datasetName = 'system-logs';
const namespace = 'default';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless we have UI to configure datasetName and namespace maybe these values can be hardcoded in the route as the saved object is created. what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

datasetName in this case is used for name required property in the route, this is the name that we use to create the apiKey. SystemLogsState is only composed by namespace. I can move the namespace to the server.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Aug 3, 2023

/oblt-deploy

@yngrdyn
Copy link
Contributor Author

yngrdyn commented Aug 4, 2023

/oblt-deploy

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observabilityOnboarding 107.3KB 107.1KB -218.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@yngrdyn yngrdyn merged commit c54d297 into elastic:main Aug 4, 2023
20 checks passed
@kibanamachine kibanamachine added v8.10.0 backport:skip This commit does not require backporting labels Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Logs Onboarding] System logs onboarding flow
5 participants