diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-06-23 15:29:49 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-06-23 15:29:49 -0700 |
| commit | d5560f2705b4cc8a07051836af7bf1be9259a2de (patch) | |
| tree | e85bd0bbffeba38f19f267ffb8aac74fa24f807c /weed/stats/metrics.go | |
| parent | 6f8b3350078299e833a2bac644df151fc716abf8 (diff) | |
| download | seaweedfs-d5560f2705b4cc8a07051836af7bf1be9259a2de.tar.xz seaweedfs-d5560f2705b4cc8a07051836af7bf1be9259a2de.zip | |
simplify metrics settings
Diffstat (limited to 'weed/stats/metrics.go')
| -rw-r--r-- | weed/stats/metrics.go | 4 |
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 |
