Skip to content

Commit

Permalink
Allow using system plugin in Windows (#3127)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielnelson authored Aug 16, 2017
1 parent eb0215c commit 3819607
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/inputs/system/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"bytes"
"fmt"
"runtime"
"strings"

"github.com/shirou/gopsutil/host"
"github.com/shirou/gopsutil/load"
Expand All @@ -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
}

Expand Down

0 comments on commit 3819607

Please sign in to comment.