mirror of https://github.com/prometheus/prometheus
Replace YieldExporter() with Handler()
parent
1cb4c819e1
commit
84d17b4d97
|
@ -34,14 +34,13 @@ var (
|
||||||
|
|
||||||
func StartServing(appState *appstate.ApplicationState) {
|
func StartServing(appState *appstate.ApplicationState) {
|
||||||
gorest.RegisterService(api.NewMetricsService(appState))
|
gorest.RegisterService(api.NewMetricsService(appState))
|
||||||
exporter := registry.DefaultRegistry.YieldExporter()
|
|
||||||
|
|
||||||
http.Handle("/", &StatusHandler{appState: appState})
|
http.Handle("/", &StatusHandler{appState: appState})
|
||||||
http.HandleFunc("/graph", graphHandler)
|
http.HandleFunc("/graph", graphHandler)
|
||||||
http.HandleFunc("/console", consoleHandler)
|
http.HandleFunc("/console", consoleHandler)
|
||||||
|
|
||||||
http.Handle("/api/", gorest.Handle())
|
http.Handle("/api/", gorest.Handle())
|
||||||
http.Handle("/metrics.json", exporter)
|
http.Handle("/metrics.json", registry.DefaultRegistry.Handler())
|
||||||
if *useLocalAssets {
|
if *useLocalAssets {
|
||||||
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static"))))
|
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("web/static"))))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue