From d551da26e55dcf2245ac58412e7c6496c5a7017a Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Tue, 9 Feb 2016 11:14:36 -0700 Subject: [PATCH] Fix exec input legacy behavior, command='' --- plugins/inputs/exec/exec.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/inputs/exec/exec.go b/plugins/inputs/exec/exec.go index 68b5055a0..e297721ba 100644 --- a/plugins/inputs/exec/exec.go +++ b/plugins/inputs/exec/exec.go @@ -101,6 +101,12 @@ func (e *Exec) SetParser(parser parsers.Parser) { } func (e *Exec) Gather(acc telegraf.Accumulator) error { + // Legacy single command support + if e.Command != "" { + e.Commands = append(e.Commands, e.Command) + e.Command = "" + } + e.errChan = make(chan error, len(e.Commands)) e.wg.Add(len(e.Commands))