-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] Allow configuration of dataset
value for Input packages
#145903
Comments
Pinging @elastic/fleet (Team:Fleet) |
@kpollich Could you clarify what do you mean by these?
Do you mean to set the |
When editing integration package policies, we show the existing
The dataset value should come from each input on these policies. e.g. |
|
No, we don't need to hide this field. I was more trying to make sure that
The intent was to show every data stream, regardless of whether it's received data or not. I'm not sure if this possible, though, thinking about it more. Data streams may be lazily initialized by Elasticsearch. e.g. Looking at the stack management UI, this does seem to be an Elasticsearch limitation. Data streams don't actually "exist" until a document is written for the first time. Let's not put too much effort into working around this limitation.
You're right - I was under the impression the custom logs package used its package name ( |
@kpollich I see, so we can match on the package name, not the data stream name. |
Yep - thanks for all the well-formed questions to clarify ❤️ |
Hmm that does seem like an issue, but I'm not 100% familiar with the permissions model here. @nchaulet could you maybe take a look? |
After checking the code, I found that the logic of building |
## Summary Closes #145903 Added datasets combo box to input type packages `Dataset name` variable with the option of creating a new one. Using the existing `/data_streams` API to show the list of all datasets. Package policy create/edit API already supports setting the value of `data_stream.dataset` (input packages should have this variable as described in #133296) To verify: - Start local EPR with input type packages as described [here](#140035 (comment)) - Add `Custom Logs` integration - Verify that Dataset name displays a dropdown and the selected value is persisted. - Verify that a new value can be entered in Dataset name - Verify that Edit integration policy displays the existing value and allows selecting/creating another one. <img width="924" alt="image" src="https://user-images.githubusercontent.com/90178898/205680787-3ef7da08-f5f0-4f05-b8d7-3a1c0a6a3d56.png"> <img width="1008" alt="image" src="https://user-images.githubusercontent.com/90178898/205679497-935fe450-ce78-4f0b-943e-58e7f851f44b.png"> <img width="1006" alt="image" src="https://user-images.githubusercontent.com/90178898/205679589-fedbbe0e-2c4d-4c00-986f-34ec5c2eb2f6.png"> Added ordering of datasets to move up those that start with the package name e.g. `system*` datasets come first if adding a `system` integration. Other than that ordering datasets alphabetically. <img width="482" alt="image" src="https://user-images.githubusercontent.com/90178898/205924837-a9807c92-2fe4-431a-88c6-f161d00812fb.png"> The rest of the requirements seem to be already implemented, see [comments](#145903 (comment)) ### Checklist - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
Child of #133296
For packages with
type: input
, users should be able to provide a new or existing dataset for their logs/metrics. This is a common use case when ingesting custom logs that conform to another integration's field structure. For instance, ingesting custom logs from S3 and routing them through the Nginx integration's ingest process is cumbersome today, but this feature will make this more seamless.Implementation
/data_streams
API if possible) to list all existingdataset
valuesdata_stream.dataset
fieldtype: input
, display thedataset
form field for thedata_stream.dataset
variable as a "top-level" fielddataset
input is pre-populated with all existing datasets. Each dropdown option is of the format<type>-<dataset>
, default dropdown value isgeneric
type
as the selected integration appear at the top of the listlog
integration, options that begin withlog-*
should appear firstoutput_permissions
list in the agent policy sent to Fleet Server includes the configured datasettype: integration
, set thedata_stream.dataset
field value via a hidden inputDesigns
Policy editor
dataset
dropdownThe text was updated successfully, but these errors were encountered: