diff options
-rw-r--r-- | node_exporter.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/node_exporter.go b/node_exporter.go index b2884c3..79863b9 100644 --- a/node_exporter.go +++ b/node_exporter.go | |||
@@ -17,6 +17,7 @@ import ( | |||
17 | "fmt" | 17 | "fmt" |
18 | "net/http" | 18 | "net/http" |
19 | _ "net/http/pprof" | 19 | _ "net/http/pprof" |
20 | "sort" | ||
20 | 21 | ||
21 | "github.com/prometheus/client_golang/prometheus" | 22 | "github.com/prometheus/client_golang/prometheus" |
22 | "github.com/prometheus/client_golang/prometheus/promhttp" | 23 | "github.com/prometheus/client_golang/prometheus/promhttp" |
@@ -87,7 +88,12 @@ func main() { | |||
87 | log.Fatalf("Couldn't create collector: %s", err) | 88 | log.Fatalf("Couldn't create collector: %s", err) |
88 | } | 89 | } |
89 | log.Infof("Enabled collectors:") | 90 | log.Infof("Enabled collectors:") |
91 | collectors := []string{} | ||
90 | for n := range nc.Collectors { | 92 | for n := range nc.Collectors { |
93 | collectors = append(collectors, n) | ||
94 | } | ||
95 | sort.Strings(collectors) | ||
96 | for _, n := range collectors { | ||
91 | log.Infof(" - %s", n) | 97 | log.Infof(" - %s", n) |
92 | } | 98 | } |
93 | 99 | ||