-
Notifications
You must be signed in to change notification settings - Fork 86
Description
There are cases when one input is directly replaced by other, their settings are mostly the same and they collect the same data, but they have different implementations. Some examples of that would be the migration from log to filestream, or from httpjson to cel. For example see https://github.com/elastic/integrations/pull/14787/files.
The problem with these migrations is that even when they are equivalent, they require user interaction. When upgrading the policy it needs to be configured again, and the old data is not available for users. This happens because Fleet uses the input type to decide the identifiers in the policies.
Support automatic migration of equivalent inputs.
A maybe naive implementation in Fleet could assume that when an input disappears in a policy and a new one appears, then the new one is replacing the other and the variables could be reused. A less naive implementation would require explicit declarations than an input is replacing an existing one. For example with something like this:
streams:
- input: cel
migrateFrom: httpjson
If Fleet is upgrading a policy with these settings, finds that the cel input is not configured, but a httpjson configuration exists, it copies the variables from one to the other.