Add link to /metrics and startup message.

This commit is contained in:
Bill Thiede 2019-02-03 17:13:24 -08:00
parent 15b40a2866
commit a518150bfe

View File

@ -189,6 +189,8 @@ var indexTmpl = template.Must(template.New("index").Parse(`<!doctype html>
<body> <body>
<div class="container"> <div class="container">
<h1>Debugging info for ZFS replication exporter</h1> <h1>Debugging info for ZFS replication exporter</h1>
<p>Metrics at <a href="/metrics">/metrics</a>
{{with .}}
{{range $host, $snapStats := .}} {{range $host, $snapStats := .}}
<h2>{{$host}}</h2> <h2>{{$host}}</h2>
<table class="table"> <table class="table">
@ -208,6 +210,10 @@ var indexTmpl = template.Must(template.New("index").Parse(`<!doctype html>
{{end}} {{end}}
</table> </table>
{{end}} {{end}}
{{else}}
<h2>Waiting for first fetch of metrics</h2>
<p>Please refresh later.</p>
{{end}}
</div> </div>
</body> </body>
</html> </html>