fix(outputs.opensearch): Use correct pipeline name while creating bulk-indexers (#16555)
This commit is contained in:
parent
0551f22bd3
commit
d8548d158d
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue