mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-02-08 14:27:00 +00:00
fix invisibility of "/metrics"
This commit is contained in:
parent
8b4d70ae5f
commit
de30c017f4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user