diff options
Diffstat (limited to 'weed/stats/metrics.go')
| -rw-r--r-- | weed/stats/metrics.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go index 9f9c0c18d..a9a24ce31 100644 --- a/weed/stats/metrics.go +++ b/weed/stats/metrics.go @@ -282,12 +282,12 @@ func LoopPushingMetric(name, instance, addr string, intervalSeconds int) { } } -func StartMetricsServer(port int) { +func StartMetricsServer(ip string, port int) { if port == 0 { return } http.Handle("/metrics", promhttp.HandlerFor(Gather, promhttp.HandlerOpts{})) - log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil)) + log.Fatal(http.ListenAndServe(fmt.Sprintf("%s:%d", ip, port), nil)) } func SourceName(port uint32) string { |
