From 8ef341a51c2db0d900eba562daf748278084bcc0 Mon Sep 17 00:00:00 2001 From: aswhit1 <44145554+aswhit1@users.noreply.github.com> Date: Tue, 30 Oct 2018 03:56:19 -0400 Subject: [PATCH] commented out 'Name' variable in struct declaration --- collector/os_memory.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/collector/os_memory.go b/collector/os_memory.go index 8ba841fc..dc125393 100644 --- a/collector/os_memory.go +++ b/collector/os_memory.go @@ -6,7 +6,6 @@ import ( "github.com/StackExchange/wmi" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/log" - "fmt" ) func init() { @@ -56,10 +55,6 @@ type OS_MemoryCollector struct { func NewOS_MemoryCollector() (Collector, error) { const subsystem = "os_memory" - // for debugging only! - fmt.Println(Namespace) - fmt.Println(subsystem) - return &OS_MemoryCollector{ AvailableBytes: prometheus.NewDesc( prometheus.BuildFQName(Namespace, subsystem, "available_bytes"), @@ -285,7 +280,10 @@ func (c *OS_MemoryCollector) Collect(ch chan<- prometheus.Metric) error { } type Win32_PerfRawData_PerfOS_Memory struct { - Name string + +// This variable was apparently part of the class, but never filled, +// resulting in a runtime error +// Name string AvailableBytes uint64 AvailableKBytes uint64