Skip service input plugins in test mode

This commit is contained in:
Cameron Sparr 2017-02-13 10:40:38 +00:00
parent ff9369f1a1
commit 22243a8354
No known key found for this signature in database
GPG Key ID: 19E67263DCB25D0F
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 { 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 := NewAccumulator(input, metricC)
acc.SetPrecision(a.Config.Agent.Precision.Duration, acc.SetPrecision(a.Config.Agent.Precision.Duration,
a.Config.Agent.Interval.Duration) a.Config.Agent.Interval.Duration)