mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-27 07:06:35 +00:00
commented out 'Name' variable in struct declaration
This commit is contained in:
committed by
Calle Pettersson
parent
1fde8bae5b
commit
8ef341a51c
@@ -6,7 +6,6 @@ import (
|
|||||||
"github.com/StackExchange/wmi"
|
"github.com/StackExchange/wmi"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/common/log"
|
"github.com/prometheus/common/log"
|
||||||
"fmt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -56,10 +55,6 @@ type OS_MemoryCollector struct {
|
|||||||
func NewOS_MemoryCollector() (Collector, error) {
|
func NewOS_MemoryCollector() (Collector, error) {
|
||||||
const subsystem = "os_memory"
|
const subsystem = "os_memory"
|
||||||
|
|
||||||
// for debugging only!
|
|
||||||
fmt.Println(Namespace)
|
|
||||||
fmt.Println(subsystem)
|
|
||||||
|
|
||||||
return &OS_MemoryCollector{
|
return &OS_MemoryCollector{
|
||||||
AvailableBytes: prometheus.NewDesc(
|
AvailableBytes: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, subsystem, "available_bytes"),
|
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 {
|
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
|
AvailableBytes uint64
|
||||||
AvailableKBytes uint64
|
AvailableKBytes uint64
|
||||||
|
|||||||
Reference in New Issue
Block a user