From d4867e22ea0bee83a99db36582682eba427db593 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 7 Jun 2019 13:16:10 +0000 Subject: [PATCH] Add user_stats handler back on querier It moved accidentally to distributor in the single-binary change https://github.com/cortexproject/cortex/pull/1262 Signed-off-by: Bryan Boreham --- pkg/cortex/modules.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cortex/modules.go b/pkg/cortex/modules.go index 2cf3b65e0c3..51d224a7f74 100644 --- a/pkg/cortex/modules.go +++ b/pkg/cortex/modules.go @@ -168,7 +168,6 @@ func (t *Cortex) initDistributor(cfg *Config) (err error) { return } - t.server.HTTP.HandleFunc("/user_stats", t.distributor.UserStatsHandler) t.server.HTTP.HandleFunc("/all_user_stats", t.distributor.AllUserStatsHandler) t.server.HTTP.Handle("/api/prom/push", t.httpAuthMiddleware.Wrap(http.HandlerFunc(t.distributor.PushHandler))) return @@ -209,6 +208,7 @@ func (t *Cortex) initQuerier(cfg *Config) (err error) { subrouter.Path("/read").Handler(t.httpAuthMiddleware.Wrap(querier.RemoteReadHandler(queryable))) subrouter.Path("/validate_expr").Handler(t.httpAuthMiddleware.Wrap(http.HandlerFunc(t.distributor.ValidateExprHandler))) subrouter.Path("/chunks").Handler(t.httpAuthMiddleware.Wrap(querier.ChunksHandler(queryable))) + subrouter.Path("/user_stats").Handler(middleware.AuthenticateUser.Wrap(http.HandlerFunc(t.distributor.UserStatsHandler))) return }