mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-11 03:31:26 +00:00
fix invisibility of "/metrics"
This commit is contained in:
parent
8b4d70ae5f
commit
de30c017f4
@ -48,17 +48,6 @@ const (
|
|||||||
staticLabelName = "static"
|
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
|
// ColumnUsage should be one of several enum values which describe how a
|
||||||
// queried row is to be converted to a Prometheus metric.
|
// queried row is to be converted to a Prometheus metric.
|
||||||
type ColumnUsage int
|
type ColumnUsage int
|
||||||
@ -1048,6 +1037,17 @@ func main() {
|
|||||||
log.AddFlags(kingpin.CommandLine)
|
log.AddFlags(kingpin.CommandLine)
|
||||||
kingpin.Parse()
|
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 {
|
if *onlyDumpMaps {
|
||||||
dumpMaps()
|
dumpMaps()
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user