Browse Source

Merge pull request #32 from brian-brazil/homepage

Add simple home page to node exporter.
pull/33/head
juliusv 10 years ago
parent
commit
b3475f7a06
  1. 9
      node_exporter.go

9
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(`<html>
<head><title>Node Exporter</title></head>
<body>
<h1>Node Exporter</h1>
<p><a href="/metrics">Metrics</a></p>
</body>
</html>`))
})
err := http.ListenAndServe(*listeningAddress, nil)
if err != nil {
glog.Fatal(err)

Loading…
Cancel
Save