Skip to content

Commit

Permalink
change error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
fearful-symmetry committed Sep 29, 2023
1 parent 3e95b58 commit 8d453cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions libbeat/idxmgmt/index_support.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ func (s *indexSupport) BuildSelector(cfg *config.C) (outputs.IndexSelector, erro
}

// VerifySetup verifies the given feature setup, will return an error string if it detects something suspect
func (m *indexManager) VerifySetup(loadTemplate, loadILM LoadMode) (bool, string) {
ilmComponent := newFeature(componentILM, m.support.enabled(componentILM), m.clientHandler.Overwrite(), loadILM)
func (m *indexManager) VerifySetup(loadTemplate, loadLifecycle LoadMode) (bool, string) {
ilmComponent := newFeature(componentILM, m.support.enabled(componentILM), m.clientHandler.Overwrite(), loadLifecycle)

templateComponent := newFeature(componentTemplate, m.support.enabled(componentTemplate),
m.support.templateCfg.Overwrite, loadTemplate)
Expand All @@ -225,9 +225,9 @@ func (m *indexManager) VerifySetup(loadTemplate, loadILM LoadMode) (bool, string

var warn string
if !ilmComponent.load {
warn += "ILM policy loading not enabled.\n"
warn += "lifecycle policy loading not enabled.\n"
} else if !ilmComponent.overwrite {
warn += "Overwriting ILM policy is disabled. Set `setup.ilm.overwrite: true` for enabling.\n"
warn += "Overwriting lifecycle policy is disabled. Set `setup.ilm.overwrite: true` or `setup.dsl.overwrite: true` to overwrite.\n"
}
if !templateComponent.load {
warn += "Template loading not enabled.\n"
Expand Down
2 changes: 1 addition & 1 deletion libbeat/idxmgmt/std_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func TestIndexManager_VerifySetup(t *testing.T) {
"ilm enabled but overwrite disabled": {
tmplEnabled: true,
ilmEnabled: true, ilmOverwrite: false, loadILM: LoadModeEnabled,
warn: "Overwriting ILM policy is disabled",
warn: "Overwriting lifecycle policy is disabled",
lifecycle: lifecycle.LifecycleConfig{ILM: lifecycle.Config{Enabled: true, Overwrite: false, PolicyName: *fmtstr.MustCompileEvent("test")}},
},
"everything enabled": {
Expand Down

0 comments on commit 8d453cd

Please sign in to comment.