Skip to content
Snippets Groups Projects
Commit 38196075 authored by Daniel Nelson's avatar Daniel Nelson Committed by GitHub
Browse files

Allow using system plugin in Windows (#3127)

parent eb0215c3
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment