From 22243a8354d0c88cf20e853fce1124d421e3c979 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Mon, 13 Feb 2017 10:40:38 +0000 Subject: [PATCH] Skip service input plugins in test mode --- agent/agent.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/agent/agent.go b/agent/agent.go index 11f343632..7909a4c8a 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -191,6 +191,12 @@ func (a *Agent) Test() error { }() for _, input := range a.Config.Inputs { + if _, ok := input.Input.(telegraf.ServiceInput); ok { + fmt.Printf("\nWARNING: skipping plugin [[%s]]: service inputs not supported in --test mode\n", + input.Name()) + continue + } + acc := NewAccumulator(input, metricC) acc.SetPrecision(a.Config.Agent.Precision.Duration, a.Config.Agent.Interval.Duration)