Simple CLI utility to create Elasticsearch index templates with ILM policies attached.
echo -e "TBD\n"To create index templates with ILM policies:
- Create a yaml config file
- Run command
polyroll <path-to-config-file>
elasticsearch:
host: "elasticsearch-host"
basicAuthToken: "basic-auth-token"
policies:
index-policy-foo:
phases:
warm: 1
cold: 30
delete: 60
templates:
index-template-foo:
policy: "index-policy-foo"
patterns: [ "index-foo-*" ]Note:
basicAuthTokenvalue must be a base64 encoded stringusername:password
Required parameters:
elasticsearch.host- ELK hostelasticsearch.basicAuthToken- ELK basic auth token
Optional parameters:
policies- map of<policy-name>: <phases>policies.*.phases.{warm|cold|delete}- optional, any integer value greater than0
templates- map of<template-name>: <settings>templates.*.policy- required, a valid policy name frompolicieslisttemplates.*.paterns- required, non-empty list of strings