Skip to content

Commit 57fecb4

Browse files
committed
first page.
1 parent d8b8367 commit 57fecb4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

qcloud_exporter.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,15 @@ func main() {
6161

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

64+
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
65+
w.Write([]byte(`<html>
66+
<head><title>TencentCloud Exporter</title></head>
67+
<body>
68+
<h1>TencentCloud Exporter</h1>
69+
<p><a href='` + *metricsPath + `'>Metrics</a></p>
70+
</body>
71+
</html>`))
72+
})
73+
6474
log.Fatal(http.ListenAndServe(*listenAddress, nil))
6575
}

0 commit comments

Comments
 (0)