mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 04:54:18 +02:00
add alias+datastream rollover, and auto rollover on index tpl change (#40)
fixes #37
This commit is contained in:
@@ -113,6 +113,12 @@ https://www.elastic.co/docs/reference/elasticsearch/index-settings
|
||||
Destination: &conf.AutoCreate,
|
||||
Aliases: []string{"a"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "rollover",
|
||||
Usage: "automatically rollover associated aliases",
|
||||
Destination: &conf.Rollover,
|
||||
Aliases: []string{"R"},
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "mode",
|
||||
Usage: "index mode, one of: standard, timeseries, logsdb or lookup",
|
||||
@@ -171,8 +177,10 @@ https://www.elastic.co/docs/reference/elasticsearch/index-settings
|
||||
return fmt.Errorf("no name specified")
|
||||
}
|
||||
|
||||
if !slices.Contains([]string{"standard", "timeseries", "logsdb", "lookup"}, conf.Mode) {
|
||||
return errors.New("mode must be one of: standard, timeseries, logsdb or lookup")
|
||||
if conf.Mode != "" {
|
||||
if !slices.Contains([]string{"standard", "timeseries", "logsdb", "lookup"}, conf.Mode) {
|
||||
return errors.New("mode must be one of: standard, timeseries, logsdb or lookup")
|
||||
}
|
||||
}
|
||||
|
||||
mappings := args.Slice()[1:]
|
||||
|
||||
Reference in New Issue
Block a user