Skip service input plugins in test mode
This commit is contained in:
parent
ff9369f1a1
commit
22243a8354
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue