Allow using system plugin in Windows (#3127)

This commit is contained in:
Daniel Nelson 2017-08-16 12:05:46 -07:00 committed by GitHub
parent 733dcf6c65
commit cc67c3f4de
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import (
"bytes"
"fmt"
"runtime"
"strings"
"github.com/shirou/gopsutil/host"
"github.com/shirou/gopsutil/load"
@ -23,7 +24,7 @@ func (_ *SystemStats) SampleConfig() string { return "" }
func (_ *SystemStats) Gather(acc telegraf.Accumulator) error {
loadavg, err := load.Avg()
if err != nil {
if err != nil && !strings.Contains(err.Error(), "not implemented") {
return err
}