aboutsummaryrefslogtreecommitdiff
path: root/weed/stats/metrics.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/stats/metrics.go')
-rw-r--r--weed/stats/metrics.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go
index 46ea6d74e..f00395ac8 100644
--- a/weed/stats/metrics.go
+++ b/weed/stats/metrics.go
@@ -107,6 +107,10 @@ func init() {
func LoopPushingMetric(name, instance string, gatherer *prometheus.Registry, fnGetMetricsDest func() (addr string, intervalSeconds int)) {
+ if fnGetMetricsDest == nil {
+ return
+ }
+
addr, intervalSeconds := fnGetMetricsDest()
pusher := push.New(addr, name).Gatherer(gatherer).Grouping("instance", instance)
currentAddr := addr