Skip to content

Commit

Permalink
Add prometheus handler
Browse files Browse the repository at this point in the history
  • Loading branch information
labkode committed Jan 16, 2017
1 parent 5131e82 commit 88b762f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/clawiod/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 88b762f

Please sign in to comment.