Skip to content

Commit

Permalink
first page.
Browse files Browse the repository at this point in the history
  • Loading branch information
Himer committed Jun 18, 2019
1 parent d8b8367 commit 57fecb4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions qcloud_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,15 @@ func main() {

http.Handle(*metricsPath, promhttp.HandlerFor(registry, promhttp.HandlerOpts{}))

http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`<html>
<head><title>TencentCloud Exporter</title></head>
<body>
<h1>TencentCloud Exporter</h1>
<p><a href='` + *metricsPath + `'>Metrics</a></p>
</body>
</html>`))
})

log.Fatal(http.ListenAndServe(*listenAddress, nil))
}

0 comments on commit 57fecb4

Please sign in to comment.