1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-11-26 22:23:31 +03:00

fix invisibility of "/metrics"

This commit is contained in:
Никита Конев (home Fedora)
2017-11-27 03:58:01 +03:00
committed by Will Rouesnel
parent 8b4d70ae5f
commit de30c017f4

View File

@@ -48,17 +48,6 @@ const (
staticLabelName = "static"
)
// landingPage contains the HTML served at '/'.
// TODO: Make cu nicer and more informative.
var landingPage = []byte(`<html>
<head><title>Postgres exporter</title></head>
<body>
<h1>Postgres exporter</h1>
<p><a href='` + *metricPath + `'>Metrics</a></p>
</body>
</html>
`)
// ColumnUsage should be one of several enum values which describe how a
// queried row is to be converted to a Prometheus metric.
type ColumnUsage int
@@ -1048,6 +1037,17 @@ func main() {
log.AddFlags(kingpin.CommandLine)
kingpin.Parse()
// landingPage contains the HTML served at '/'.
// TODO: Make cu nicer and more informative.
var landingPage = []byte(`<html>
<head><title>Postgres exporter</title></head>
<body>
<h1>Postgres exporter</h1>
<p><a href='` + *metricPath + `'>Metrics</a></p>
</body>
</html>
`)
if *onlyDumpMaps {
dumpMaps()
return