Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Commit

Permalink
Add prometheus metrics endpoint to probes. (weaveworks#1915)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwilkie authored Oct 10, 2016
1 parent 2bc31e8 commit 7d88279
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions prog/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

log "github.com/Sirupsen/logrus"
"github.com/armon/go-metrics"
"github.com/prometheus/client_golang/prometheus"
"github.com/weaveworks/go-checkpoint"
"github.com/weaveworks/weave/common"

Expand Down Expand Up @@ -246,6 +247,7 @@ func probeMain(flags probeFlags, targets []appclient.Target) {

if flags.httpListen != "" {
go func() {
http.Handle("/metrics", prometheus.Handler())
log.Infof("Profiling data being exported to %s", flags.httpListen)
log.Infof("go tool proof http://%s/debug/pprof/{profile,heap,block}", flags.httpListen)
log.Infof("Profiling endpoint %s terminated: %v", flags.httpListen, http.ListenAndServe(flags.httpListen, nil))
Expand Down

0 comments on commit 7d88279

Please sign in to comment.