From 87830a1c387528de03167073fbb00f1919044e0b Mon Sep 17 00:00:00 2001 From: Noah Crowley Date: Tue, 16 Jan 2018 16:44:56 -0500 Subject: [PATCH] Ignore empty lines in Graphite plaintext (#3684) --- plugins/parsers/graphite/parser.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/parsers/graphite/parser.go b/plugins/parsers/graphite/parser.go index ebbbcd280..42d617c7d 100644 --- a/plugins/parsers/graphite/parser.go +++ b/plugins/parsers/graphite/parser.go @@ -86,8 +86,11 @@ func (p *GraphiteParser) Parse(buf []byte) ([]telegraf.Metric, error) { // Trim the buffer, even though there should be no padding line := strings.TrimSpace(string(buf)) - metric, err := p.ParseLine(line) + if line == "" { + continue + } + metric, err := p.ParseLine(line) if err == nil { metrics = append(metrics, metric) } else {