Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit 471af44

Browse files
committed
Add /metrics to our custom mux
Otherwise it cannot be queried
1 parent 4dba4ed commit 471af44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/timescale-prometheus/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ func main() {
157157
}
158158
log.Info("msg", "Version:"+Version+"; Commit Hash: "+CommitHash)
159159
log.Info("config", util.MaskPassword(fmt.Sprintf("%+v", cfg)))
160-
http.Handle(cfg.telemetryPath, promhttp.Handler())
161160

162161
elector, err = initElector(cfg)
163162

@@ -278,6 +277,7 @@ func main() {
278277

279278
mux := http.NewServeMux()
280279
mux.Handle("/", router)
280+
mux.Handle(cfg.telemetryPath, promhttp.Handler())
281281
mux.HandleFunc("/debug/pprof/", pprof.Index)
282282
mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
283283
mux.HandleFunc("/debug/pprof/profile", pprof.Profile)

0 commit comments

Comments
 (0)