fix(outputs.opensearch): Use correct pipeline name while creating bulk-indexers (#16555)

This commit is contained in:
Sai Kiran 2025-03-04 20:50:52 +05:30 committed by GitHub
parent 0551f22bd3
commit d8548d158d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -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)