Fix issue with elasticsearch output being really noisy about some errors (#8748)
This commit is contained in:
parent
c0524dbe2e
commit
52aaadfd79
|
|
@ -309,6 +309,7 @@ func (a *Elasticsearch) Write(metrics []telegraf.Metric) error {
|
|||
if res.Errors {
|
||||
for id, err := range res.Failed() {
|
||||
log.Printf("E! Elasticsearch indexing failure, id: %d, error: %s, caused by: %s, %s", id, err.Error.Reason, err.Error.CausedBy["reason"], err.Error.CausedBy["type"])
|
||||
break
|
||||
}
|
||||
return fmt.Errorf("W! Elasticsearch failed to index %d metrics", len(res.Failed()))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue