Only log the overwritten metric warning on 1st overwrite per buffer
see #807
This commit is contained in:
parent
41e2c7f6da
commit
17d45adcaa
|
@ -82,9 +82,11 @@ func (ro *RunningOutput) AddMetric(metric telegraf.Metric) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if ro.overwriteI == 0 {
|
||||||
log.Printf("WARNING: overwriting cached metrics, you may want to " +
|
log.Printf("WARNING: overwriting cached metrics, you may want to " +
|
||||||
"increase the metric_buffer_limit setting in your [agent] " +
|
"increase the metric_buffer_limit setting in your [agent] " +
|
||||||
"config if you do not wish to overwrite metrics.\n")
|
"config if you do not wish to overwrite metrics.\n")
|
||||||
|
}
|
||||||
if ro.overwriteI == len(ro.metrics) {
|
if ro.overwriteI == len(ro.metrics) {
|
||||||
ro.overwriteI = 0
|
ro.overwriteI = 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue