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

[Discuss] Sample configs for standalone Elastic Agent #6142

Closed
wants to merge 1 commit into from
Closed

[Discuss] Sample configs for standalone Elastic Agent #6142

wants to merge 1 commit into from

Conversation

ruflin
Copy link

@ruflin ruflin commented Nov 4, 2022

Playing around with ECK and Elastic Agent I stumbled over these sample configuration files. I'm opening this issue to discuss some parts I spotted in the config file which might need adjustment.

  • ids: We have ids in many places but my understanding is that these are only need for the filestream input. The ids in the policy come from Fleet but are not needed in standalone mode. If these are used for some metrics reporting, I'm concerned as these are statically coded now in standalone, could it cause some unwanted side effects?
  • Package version: The package version is the policy but the package installed in Fleet my have a different version. It should be removed as the info is likely incorrect.
  • Config id and revision: Does not have an affect in standalone and might be confusing.

I assume the above parts in the config come from a policy that was copied from Fleet and then put here as an example. I removed an example for each, there are more similar examples in the config. Internal Fleet information should not leak into standalone sample configs. The same problem will likely apply to other sample configs.

The configs can be found here on our website: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-elastic-agent-configuration-examples.html#k8s_multiple_elasticsearch_clusters_output

Playing around with ECK and Elastic Agent I stumbled over these sample configuration files. I'm opening this issue to discuss some parts I spotted in the config file which might need adjustment.

* ids: We have ids in many places but my understanding is that these are only need for the filestream input. The ids in the policy come from Fleet but are not needed in standalone mode. If these are used for some metrics reporting, I'm concerned as these are statically coded now in standalone, could it cause some unwanted side effects?
* Package version: The package version is the policy but the package installed in Fleet my have a different version. It should be removed as the info is likely incorrect.
* Config id and revision: Does not have an affect in standalone and might be confusing.

I assume the above parts in the config come from a policy that was copied from Fleet and then put here as an example. I removed an example for each, there are more similar examples in the config. Internal Fleet information should not leak into standalone sample configs.
@botelastic botelastic bot added the triage label Nov 4, 2022
@ruflin
Copy link
Author

ruflin commented Nov 4, 2022

@cmacknz Would be great to get the input from you or someone on the team on this. Should we also tweak these configs further as it is likely users will use this as a default example to get running?

@ruflin ruflin self-assigned this Nov 4, 2022
@pebrc pebrc added the >enhancement Enhancement of existing functionality label Nov 4, 2022
@botelastic botelastic bot removed the triage label Nov 4, 2022
agent:
monitoring:
enabled: true
use_output: monitoring
logs: true
metrics: true
inputs:
- id: 2e187fb0-33a5-11eb-bb2f-418d0388a8cf
Copy link
Member

Choose a reason for hiding this comment

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

I would keep this but try to make it match what Fleet would generate. The Fleet UI generates unique IDs per input, and we should try to stay consistent between standalone and fleet policies.

A policy generated in the fleet UI would name this something like system/logfile-2e187fb0-33a5-11eb-bb2f-418d0388a8cf. The PR that added unique IDs is elastic/kibana#127343

The logfile input should work without it but there is an effort to transparently convert logfile to filestream under the hood and in that case we'll want the input and stream IDs to be unique.

@ruflin
Copy link
Author

ruflin commented Nov 7, 2022

@cmacknz I mainly opened this PR to start a discussion. Ideally I think the Elastic Agent team would own this moving forward or collaborate with the cloud-on-k8s on changes. These are the examples users get started so I assume these are seen / used pretty often.

@cmacknz
Copy link
Member

cmacknz commented Nov 7, 2022

Ideally I think the Elastic Agent team would own this moving forward or collaborate with the cloud-on-k8s on changes. These are the examples users get started so I assume these are seen / used pretty often.

Agreed if these are the official getting started examples. I didn't even know these were here previously.

@pebrc
Copy link
Collaborator

pebrc commented Nov 7, 2022

Ideally I think the Elastic Agent team would own this moving forward or collaborate with the cloud-on-k8s on changes.

I agree and thanks for taking look at these configurations. Not that it matters much but I think they were originally generated via the Fleet UI via the function where you can download the configuration and then probably modified subsequently as things changed.

@ruflin ruflin assigned cmacknz and unassigned ruflin Nov 8, 2022
@cmacknz
Copy link
Member

cmacknz commented Nov 9, 2022

I think the best path for keeping these up to date is to move them into the agent repository itself, to live besides the examples for the fleet and agent documentation: https://github.com/elastic/elastic-agent/tree/main/deploy/kubernetes

Probably the least disruptive option would be to just build automation that automatically opens a PR here every time they change in the agent repository. I'll investigate if that is possible.

@thbkrkr
Copy link
Contributor

thbkrkr commented Dec 20, 2022

Closing since the next step is on the agent side. Thank you for starting this discussion.

@thbkrkr thbkrkr closed this Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement Enhancement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants