From 38196075119b55b5510e22ac6365022645fea410 Mon Sep 17 00:00:00 2001
From: Daniel Nelson <daniel@wavesofdawn.com>
Date: Wed, 16 Aug 2017 12:05:46 -0700
Subject: [PATCH] Allow using system plugin in Windows (#3127)

---
 plugins/inputs/system/system.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plugins/inputs/system/system.go b/plugins/inputs/system/system.go
index 1a61f11b..32c391f7 100644
--- a/plugins/inputs/system/system.go
+++ b/plugins/inputs/system/system.go
@@ -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
 	}
 
-- 
GitLab