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 {
|
||||||
log.Printf("WARNING: overwriting cached metrics, you may want to " +
|
if ro.overwriteI == 0 {
|
||||||
"increase the metric_buffer_limit setting in your [agent] " +
|
log.Printf("WARNING: overwriting cached metrics, you may want to " +
|
||||||
"config if you do not wish to overwrite metrics.\n")
|
"increase the metric_buffer_limit setting in your [agent] " +
|
||||||
|
"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