Skip to content

Commit

Permalink
Skip service input plugins in test mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Feb 13, 2017
1 parent ff9369f commit 22243a8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 22243a8

Please sign in to comment.