mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-09 23:24:09 -08:00
Add simple home page to node exporter.
This commit is contained in:
parent
6d7e08e78b
commit
b50da59ee6
|
@ -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…
Reference in a new issue