Open kpollich opened 1 year ago
Pinging @elastic/fleet (Team:Fleet)
The highlighted section of "advanced fields" are defined by the
nginx
integration, but with this change in Fleet they'd appear in the same spot for all data streams across all integrations.
@kpollich: Not all of these fields would be valid for all datastreams. For Eg: ignore_older,tags is true only for logs datastream.
Thanks, @ishleenk17
Not all of these fields would be valid for all datastreams. For Eg: ignore_older,tags is true only for logs datastream.
We could define a baseline compatibility condition in Fleet by adding a condition to each variable definition like data_stream_types: [logs, metrics]
.
@kpollich : On the same lines as ignore_older, there is another variable "Preserve Original Events" which is meant to be present for all the logs datastream by default.
cc: @lalit-satapathy
Thanks @ishleenk17, I've updated the description to capture that variable.
@nimarezainia - Can you confirm that we're okay to start here with just the processors
variable to validate the implementation? I think we had talked about reducing our scope here to just processors
for now but would like to confirm. Thanks.
@kpollich yes we should go with processors first. add_fields or add_tags can be used to achieve the tagging requirement if needed.
Ref https://github.com/elastic/elastic-package/issues/949
There are several common variables that are defined across many integrations that have broad use cases and generic appeal to users, e.g.
tags
-string[]
processors
-string
(yml box)ignore_older
-string
preserve_original_event
-boolean
These variables are almost always copy/pasted between various data streams that want to support them. This is a manual process, and incurs a maintenance burden for integrations that want to adopt these universally applicable variables. If we wanted to adopt these across all integrations today, we'd also need to publish a new version of every single integrations or accept a slow pace of adoption - neither of which is particularly appealing.
Instead, we should add logic to Fleet to append these fields to all data streams across all integrations.
When a user opens policy editor to create/edit a package policy, Fleet will check a hardcoded list of global variable definitions and append those variables to the policy editor section for each data stream.
The
nginx
integration'saccess
dataset is a good example of what the "end state" would look like for all data streams:The highlighted section of "advanced fields" are defined by the
nginx
integration, but with this change in Fleet they'd appear in the same spot for all data streams across all integrations.There's a few open questions and caveats to consider, e.g:
To start, let's limit the approach here to only the
processors
variable. This will let us validate the approach and iron out any of the edge cases around upgrades, deferring to integration manifests, etc.Proposed configuration schema
Each variable definition should conform to an object that extends the package spec's variable definition. However, we should enforce a few caveats for the v1 of this implementation in the interest of avoiding complexity:
Show advanced
collapsible regionrequired