From 7407c09c15f8427531ec11d3991acbe8ea463283 Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Sun, 6 Sep 2015 07:40:09 +0100 Subject: [PATCH] Improve landing page --- main.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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) + } } -- 2.25.1