Adds dummy prom metrics for alerting
This commit is contained in:
parent
37d0335f92
commit
b8491e384d
@ -68,6 +68,7 @@ func NewController(conf Config, mprof, pprof, staticFiles string) *http.ServeMux
|
|||||||
"bandwidth": "/api/v0/game/bw/",
|
"bandwidth": "/api/v0/game/bw/",
|
||||||
"fsu": "/api/v0/fsu/",
|
"fsu": "/api/v0/fsu/",
|
||||||
"info": "/api/v0/info/",
|
"info": "/api/v0/info/",
|
||||||
|
"metrics": "/metrics",
|
||||||
}
|
}
|
||||||
|
|
||||||
sm := http.NewServeMux()
|
sm := http.NewServeMux()
|
||||||
@ -108,6 +109,9 @@ func NewController(conf Config, mprof, pprof, staticFiles string) *http.ServeMux
|
|||||||
sm.Handle(prefix["bandwidth"], JsonHandler(c.BW))
|
sm.Handle(prefix["bandwidth"], JsonHandler(c.BW))
|
||||||
sm.HandleFunc(prefix["fsu"], c.KillServer)
|
sm.HandleFunc(prefix["fsu"], c.KillServer)
|
||||||
sm.HandleFunc(prefix["info"], c.Info)
|
sm.HandleFunc(prefix["info"], c.Info)
|
||||||
|
sm.HandleFunc(prefix["metrics"], func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
fmt.Fprintf(w, "up 1\n")
|
||||||
|
})
|
||||||
|
|
||||||
return sm
|
return sm
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user