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:"-"`
|
Log telegraf.Logger `toml:"-"`
|
||||||
tls.ClientConfig
|
tls.ClientConfig
|
||||||
|
|
||||||
pipelineName string
|
|
||||||
indexTmpl *template.Template
|
indexTmpl *template.Template
|
||||||
pipelineTmpl *template.Template
|
pipelineTmpl *template.Template
|
||||||
onSucc func(context.Context, opensearchutil.BulkIndexerItem, opensearchutil.BulkIndexerResponseItem)
|
onSucc func(context.Context, opensearchutil.BulkIndexerItem, opensearchutil.BulkIndexerResponseItem)
|
||||||
|
|
@ -324,7 +323,7 @@ func getTargetIndexers(metrics []telegraf.Metric, osInst *Opensearch) map[string
|
||||||
|
|
||||||
if pipelineName != "" {
|
if pipelineName != "" {
|
||||||
// BulkIndexer supports pipeline at config level not metric level
|
// BulkIndexer supports pipeline at config level not metric level
|
||||||
if _, ok := indexers[osInst.pipelineName]; ok {
|
if _, ok := indexers[pipelineName]; ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
bulkIndxr, err := createBulkIndexer(osInst, pipelineName)
|
bulkIndxr, err := createBulkIndexer(osInst, pipelineName)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue