From b50da59ee64a6b07b8dde545e358cbfb877e4210 Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Fri, 9 Jan 2015 12:52:08 +0000 Subject: [PATCH] Add simple home page to node exporter. --- node_exporter.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/node_exporter.go b/node_exporter.go index 34edf71f..1be34c1b 100644 --- a/node_exporter.go +++ b/node_exporter.go @@ -172,6 +172,15 @@ func main() { } go func() { http.Handle("/metrics", handler) + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(` + Node Exporter + +

Node Exporter

+

Metrics

+ + `)) + }) err := http.ListenAndServe(*listeningAddress, nil) if err != nil { glog.Fatal(err)