Skip service input plugins in test mode

This commit is contained in:
Cameron Sparr 2017-02-13 10:40:38 +00:00
parent d373fbbaaf
commit 577b25bcd1
1 changed files with 6 additions and 0 deletions

View File

@ -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)