From ab9ee574fbb912a731aabeb3d5bb22174ea10a9a Mon Sep 17 00:00:00 2001 From: "Caskey L. Dickson" Date: Thu, 7 Jan 2016 17:59:16 -0800 Subject: [PATCH] Build cleanly under windows. Removes unused signal handlers left over from signal based collection and block the non windows-relevant collectors loadavg and interrupts. Signal based collection removed in 1c17481a4289a81b70e482fcf1d4a432da87c5de. --- collector/interrupts_common.go | 1 + collector/loadavg.go | 1 + node_exporter.go | 6 ------ 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/collector/interrupts_common.go b/collector/interrupts_common.go index 84667d8f..555a90d9 100644 --- a/collector/interrupts_common.go +++ b/collector/interrupts_common.go @@ -14,6 +14,7 @@ // +build !nointerrupts // +build !darwin // +build !freebsd +// +build !windows package collector diff --git a/collector/loadavg.go b/collector/loadavg.go index d8d580d2..1a022660 100644 --- a/collector/loadavg.go +++ b/collector/loadavg.go @@ -12,6 +12,7 @@ // limitations under the License. // +build !noloadavg +// +build !windows package collector diff --git a/node_exporter.go b/node_exporter.go index f1569a17..a68930bc 100644 --- a/node_exporter.go +++ b/node_exporter.go @@ -18,12 +18,9 @@ import ( "fmt" "net/http" _ "net/http/pprof" - "os" - "os/signal" "sort" "strings" "sync" - "syscall" "time" "github.com/prometheus/client_golang/prometheus" @@ -154,9 +151,6 @@ func main() { nodeCollector := NodeCollector{collectors: collectors} prometheus.MustRegister(nodeCollector) - sigUsr1 := make(chan os.Signal) - signal.Notify(sigUsr1, syscall.SIGUSR1) - handler := prometheus.Handler() http.Handle(*metricsPath, handler)