-
Notifications
You must be signed in to change notification settings - Fork 45
Allow a dynamic target index in ISM Rollup #428
Comments
I believe @thalurur just did something similar for snapshot name too. That being said, correct me if I'm wrong Ravi, but if @mark-meyer applies this policy to daily log indices even if they roll up into the same target index they will not overwrite each other. We do support multiple rollups in the same index. Each index that is managed by the policy would have a rollup job created for itself when the rollup action is created which will use its own rollup ID as a namespace in the target index to handle conflicts. And the rollup ID seems to consist of a hash of the job configuration and the source index which will be unique per daily log index. Edit: Do we delete these temporary rollup jobs after they finish @thalurur? |
At the moment ISM action will not delete the jobs after they are finished. Rest of the behavior described by Drew is accurate - at the moment the same policy will be creating multiple jobs (based on the source index the policy is being executed on) and all of these jobs writing data to the same target index. And data from each job cannot be touched by other jobs as their namespace includes the rollup job id. Rollup implementation have some constraints imposed at the moment:
The above makes the only way to rollup data for daily log indices is to create one job that writes to one target index. So the rolled up data can be searched together. What happens with current policy: What happens with proposed policy: We have few options if we need to support either:
@mark-meyer Couple of questions:
|
+1 I was trying to setup rollup policy with target index containing date math expression
Without such possibility I guess I need to create some script running every day that would create rollup jobs itself which is much uglier solution. To sum up - it would be nice to be able to setup a rollup job/rollup policy with dynamic target index. |
I would like to apply a policy to daily log indices that performs a rollup in one of the states before deleting the index. However is seem the
target_index
requires a string and there is no option to interpolate something like{{ctx.index}}
or similar. This makes it impossible to apply this policy to more than one index unless you are okay with rollup overwriting the previous one, which you probably aren't.Describe the solution you'd like
I would like to specify the
target_index
field of an ism rollup dynamically based on the name (or some other metadata) of the index being rolled up such as"target_index": "rollup_{{ctx.index}}"
The text was updated successfully, but these errors were encountered: