IM policies export & UI & auto management on new index

Could you please confirm that Index management policies is not exportable in saved objects ?
if yes, is it planned in a near future ?

I regret there is no way to assign policies on a index pattern, it seems we have to update index template to do the job. Am i wrong ?

is the current interface the final one ? manipulating a json is not very user friendly.

Good job anyway and thank you.

Hi @yohan_al,

There is no plan to make them exportable in saved objects.

I regret there is no way to assign policies on a index pattern, it seems we have to update index template to do the job. Am i wrong ?

You are able to assign policies via index templates which allow you to specify an index pattern.
i.e. you can have an index template for logstash-* that applies example_policy on all newly created logstash indices.

Are you looking for a different behavior?

There is no plan to make them exportable in saved objects.

i guess, i m missing something. Let’s take a simple example.
I have two platforms : stage and production. How do i copy my index policies from stage to production ? (snapshot and restore on the index managment config ?
should i create them manually ?

Are you looking for a different behavior?

global behaviour is ok but i was expecting that the index template was creating in the Index Management interface instead of doing this manualy.

Yes, I was about to post a similar question.

Basically, we must use the API to create an index template and apply policy to indexes created by rollover alias because there’s no way to do that in Index State Management (or there is and I can’t figure out how).

Hi @yohan_al and @dac388,

Yes, you currently have to create an index template as you would normally through the API. If you want policies to apply to rolled over indices you would need to add the policy_id in this template.
Allowing you create index templates (and other index operations) all from the Index Management plugin is on our roadmap, but we first released with the Index State Management portion (Policies, Managed Indices, etc.).

With regards to exporting it’s not something we currently support through ISM. You would have to use other solutions or write a script as of right now. But, it’s something we can add to our backlog and pick up.

It’s unlikely that we will do this through Kibana’s “saved objects” API though, as your problem also applies to users that only use the elasticsearch plugin.

Is there some misalignment with the elasticsearch API? because using their index template examples does not work.

https://www.elastic.co/guide/en/elasticsearch/reference/current/using-policies-rollover.html

https://www.elastic.co/guide/en/elasticsearch/reference/current/using-policies-rollover.html

These are two different plugins and you should not count on alignment between the two.
We have documentation available for Index Management here.
If it’s missing details/examples let us know and we can add more.
That said, for our plugin you would need to use these settings in your template:

"index.opendistro.index_state_management.policy_id": "my_policy", 
"index.opendistro.index_state_management.rollover_alias": "test-alias" 

Thanks, that should help.

Yes, I think more examples will help a lot. I’m spinning this up in test and production Docker Datacenter clusters and have struggled a bit with the lack of examples. Maybe I’ll post the whole process somewhere to help others get started.

I’m sure that would help out others a lot!

Will work with our technical writers to get more examples up there, thanks.