aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Trangoni <mario@mariotrangoni.de>2018-04-29 14:35:43 +0200
committerJohannes 'fish' Ziemke <github@freigeist.org>2018-04-29 14:35:43 +0200
commit24a28fcc9e9123b3b39058918f98b64a1938a0a9 (patch)
tree9274a24d965022e1464eea2a5ea7e01ad00fb099
parentc9f421d0dd8699396b3fd94dc6e595475d28ad1e (diff)
downloadprometheus_node_collector-24a28fcc9e9123b3b39058918f98b64a1938a0a9.tar.bz2
prometheus_node_collector-24a28fcc9e9123b3b39058918f98b64a1938a0a9.tar.xz
prometheus_node_collector-24a28fcc9e9123b3b39058918f98b64a1938a0a9.zip
Remove unused func, var, and const (#928)
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
-rw-r--r--collector/collector.go4
-rw-r--r--collector/cpu_linux.go5
-rw-r--r--collector/textfile.go2
3 files changed, 0 insertions, 11 deletions
diff --git a/collector/collector.go b/collector/collector.go
index e9a78f0..f657a66 100644
--- a/collector/collector.go
+++ b/collector/collector.go
@@ -42,10 +42,6 @@ var (
42 ) 42 )
43) 43)
44 44
45func warnDeprecated(collector string) {
46 log.Warnf("The %s collector is deprecated and will be removed in the future!", collector)
47}
48
49const ( 45const (
50 defaultEnabled = true 46 defaultEnabled = true
51 defaultDisabled = false 47 defaultDisabled = false
diff --git a/collector/cpu_linux.go b/collector/cpu_linux.go
index e79d00c..e2a3122 100644
--- a/collector/cpu_linux.go
+++ b/collector/cpu_linux.go
@@ -19,7 +19,6 @@ import (
19 "fmt" 19 "fmt"
20 "os" 20 "os"
21 "path/filepath" 21 "path/filepath"
22 "regexp"
23 "strconv" 22 "strconv"
24 "strings" 23 "strings"
25 24
@@ -28,10 +27,6 @@ import (
28 "github.com/prometheus/procfs" 27 "github.com/prometheus/procfs"
29) 28)
30 29
31var (
32 digitRegexp = regexp.MustCompile("[0-9]+")
33)
34
35type cpuCollector struct { 30type cpuCollector struct {
36 cpu *prometheus.Desc 31 cpu *prometheus.Desc
37 cpuGuest *prometheus.Desc 32 cpuGuest *prometheus.Desc
diff --git a/collector/textfile.go b/collector/textfile.go
index 03a5e11..bc2ac43 100644
--- a/collector/textfile.go
+++ b/collector/textfile.go
@@ -22,7 +22,6 @@ import (
22 "path/filepath" 22 "path/filepath"
23 "sort" 23 "sort"
24 "strings" 24 "strings"
25 "sync"
26 "time" 25 "time"
27 26
28 "github.com/prometheus/client_golang/prometheus" 27 "github.com/prometheus/client_golang/prometheus"
@@ -34,7 +33,6 @@ import (
34 33
35var ( 34var (
36 textFileDirectory = kingpin.Flag("collector.textfile.directory", "Directory to read text files with metrics from.").Default("").String() 35 textFileDirectory = kingpin.Flag("collector.textfile.directory", "Directory to read text files with metrics from.").Default("").String()
37 textFileAddOnce sync.Once
38 mtimeDesc = prometheus.NewDesc( 36 mtimeDesc = prometheus.NewDesc(
39 "node_textfile_mtime_seconds", 37 "node_textfile_mtime_seconds",
40 "Unixtime mtime of textfiles successfully read.", 38 "Unixtime mtime of textfiles successfully read.",