From 7f65e4b834f5f350a8366961c98237b841231c0a Mon Sep 17 00:00:00 2001 From: fearful-symmetry Date: Mon, 23 Oct 2023 09:50:37 -0700 Subject: [PATCH 1/2] separate out validation messages in index setup --- libbeat/idxmgmt/index_support.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libbeat/idxmgmt/index_support.go b/libbeat/idxmgmt/index_support.go index 94fd3b07db08..1b9529018b93 100644 --- a/libbeat/idxmgmt/index_support.go +++ b/libbeat/idxmgmt/index_support.go @@ -223,11 +223,18 @@ func (m *indexManager) VerifySetup(loadTemplate, loadLifecycle LoadMode) (bool, "Check your configuration." } + m.clientHandler.Mode() + var warn string if !ilmComponent.load { warn += "lifecycle policy loading not enabled.\n" } else if !ilmComponent.overwrite { - warn += "Overwriting lifecycle policy is disabled. Set `setup.ilm.overwrite: true` or `setup.dsl.overwrite: true` to overwrite.\n" + if m.clientHandler.Mode() == lifecycle.DSL { + warn += "Overwriting lifecycle policy is disabled. Set `setup.dsl.overwrite: true` to overwrite.\n" + } else { + warn += "Overwriting lifecycle policy is disabled. Set `setup.ilm.overwrite: true` to overwrite.\n" + } + } if !templateComponent.load { warn += "Template loading not enabled.\n" From 7730b04c9bbdd7bd60b58f0e3c05d87d333cae79 Mon Sep 17 00:00:00 2001 From: fearful-symmetry Date: Mon, 23 Oct 2023 09:53:01 -0700 Subject: [PATCH 2/2] add extra line --- libbeat/idxmgmt/index_support.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/libbeat/idxmgmt/index_support.go b/libbeat/idxmgmt/index_support.go index 1b9529018b93..4526d916c359 100644 --- a/libbeat/idxmgmt/index_support.go +++ b/libbeat/idxmgmt/index_support.go @@ -223,8 +223,6 @@ func (m *indexManager) VerifySetup(loadTemplate, loadLifecycle LoadMode) (bool, "Check your configuration." } - m.clientHandler.Mode() - var warn string if !ilmComponent.load { warn += "lifecycle policy loading not enabled.\n"