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