From de30c017f4f1a4c35edb0d31a4873066f6d61168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=9A=D0=BE=D0=BD?= =?UTF-8?q?=D0=B5=D0=B2=20=28home=20Fedora=29?= Date: Mon, 27 Nov 2017 03:58:01 +0300 Subject: [PATCH] fix invisibility of "/metrics" --- postgres_exporter.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/postgres_exporter.go b/postgres_exporter.go index 9fd39d7e..a976e75f 100644 --- a/postgres_exporter.go +++ b/postgres_exporter.go @@ -48,17 +48,6 @@ const ( staticLabelName = "static" ) -// landingPage contains the HTML served at '/'. -// TODO: Make cu nicer and more informative. -var landingPage = []byte(` -Postgres exporter - -

Postgres exporter

-

Metrics

- - -`) - // 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(` + Postgres exporter + +

Postgres exporter

+

Metrics

+ + + `) + if *onlyDumpMaps { dumpMaps() return