Skip service input plugins in test mode
This commit is contained in:
parent
d373fbbaaf
commit
577b25bcd1
|
@ -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