From: Brian Brazil Date: Sun, 6 Sep 2015 06:40:09 +0000 (+0100) Subject: Improve landing page X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7407c09c15f8427531ec11d3991acbe8ea463283;p=blackbox_exporter.git Improve landing page --- diff --git a/main.go b/main.go index 8bdb529..d3889ab 100644 --- a/main.go +++ b/main.go @@ -99,5 +99,17 @@ func main() { func(w http.ResponseWriter, r *http.Request) { probeHandler(w, r, &config) }) - http.ListenAndServe(*addr, nil) + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(` + Blackbox Exporter + +

Blackbox Exporter

+

Probe prometheus.io for http2xx

+

Metrics

+ + `)) + }) + if err := http.ListenAndServe(*addr, nil); err != nil { + log.Fatalf("Error starting HTTP server: %s", err) + } }