From 88b762fc8c01a2b04dd59b8e81e36d0ae52528aa Mon Sep 17 00:00:00 2001 From: Hugo Gonzalez Date: Mon, 16 Jan 2017 16:38:01 +0100 Subject: [PATCH] Add prometheus handler --- cmd/clawiod/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/clawiod/server.go b/cmd/clawiod/server.go index 08844be..cd74317 100644 --- a/cmd/clawiod/server.go +++ b/cmd/clawiod/server.go @@ -64,6 +64,8 @@ func (s *server) configureRouter() error { s.logger.Info().Log("msg", "web services enabled", "webservices", config.GetEnabledWebServices()) router := mux.NewRouter() + router.Handle("/metrics", prometheus.Handler()).Methods("GET") + s.logger.Info().Log("method", "GET", "endpoint", "/metrics", "msg", "endpoint available - created by prometheus") for key, service := range webServices { s.logger.Info().Log("msg", key+" web service enabled") for path, methods := range service.Endpoints() {