From d8548d158ddacca72f8841e01ee46111af16f3c2 Mon Sep 17 00:00:00 2001 From: Sai Kiran Date: Tue, 4 Mar 2025 20:50:52 +0530 Subject: [PATCH] fix(outputs.opensearch): Use correct pipeline name while creating bulk-indexers (#16555) --- plugins/outputs/opensearch/opensearch.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/outputs/opensearch/opensearch.go b/plugins/outputs/opensearch/opensearch.go index 0911cd978..ab92f2dfc 100644 --- a/plugins/outputs/opensearch/opensearch.go +++ b/plugins/outputs/opensearch/opensearch.go @@ -52,7 +52,6 @@ type Opensearch struct { Log telegraf.Logger `toml:"-"` tls.ClientConfig - pipelineName string indexTmpl *template.Template pipelineTmpl *template.Template onSucc func(context.Context, opensearchutil.BulkIndexerItem, opensearchutil.BulkIndexerResponseItem) @@ -324,7 +323,7 @@ func getTargetIndexers(metrics []telegraf.Metric, osInst *Opensearch) map[string if pipelineName != "" { // BulkIndexer supports pipeline at config level not metric level - if _, ok := indexers[osInst.pipelineName]; ok { + if _, ok := indexers[pipelineName]; ok { continue } bulkIndxr, err := createBulkIndexer(osInst, pipelineName)