I want to create ILP to elasticsearch monitoring index, i have ILP created, and now i want to link it to the System template ".monitoring-es" but in order to have everything persistent and ready to be reused, we implement those with API calls (curl post request with json template in it).
My goal is to get ".monitoring-es" template in the way where i can just add "index.lifecycle.name" and "index.lifecycle.rollover_alias" in the settings and apply it again.
I tried with curl
http://IP/_template/.monitoring-es?pretty=true > template.json
But this format is not something that i can reapply after that with
curl -XPUT -H 'Content-Type: application/json' http://IP/_template/template.json
How can export this template in the way that i can edit it and reaplly it?