aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSky <tor-gitlab@codestorm.net>2024-04-03 06:52:36 +0000
committerSky <tor-gitlab@codestorm.net>2024-04-04 06:28:33 +0000
commitd439f89536279af125b9f90cdd4417b533aec3ee (patch)
tree83bba2bc3b93665e7bd8dd259129eb2d09d5310d
parentdebd473977d33c03886b2cbfd01e904b03b9eb08 (diff)
downloadsnowflake-d439f89536279af125b9f90cdd4417b533aec3ee.tar.gz
snowflake-d439f89536279af125b9f90cdd4417b533aec3ee.zip
Allow to set listen address for metrics service via cl flags
-rw-r--r--proxy/main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/proxy/main.go b/proxy/main.go
index a385aee..5df1893 100644
--- a/proxy/main.go
+++ b/proxy/main.go
@@ -35,6 +35,7 @@ func main() {
"the time interval to output summary, 0s disables summaries. Valid time units are \"s\", \"m\", \"h\". ")
disableStatsLogger := flag.Bool("disable-stats-logger", false, "disable the exposing mechanism for stats using logs")
enableMetrics := flag.Bool("metrics", false, "enable the exposing mechanism for stats using metrics")
+ metricsAddress := flag.String("metrics-address", "localhost", "set listen address for metrics service")
metricsPort := flag.Int("metrics-port", 9999, "set port for the metrics service")
verboseLogging := flag.Bool("verbose", false, "increase log verbosity")
ephemeralPortsRangeFlag := flag.String("ephemeral-ports-range", "", "ICE UDP ephemeral ports range (format:\"<min>:<max>\")")
@@ -133,7 +134,7 @@ func main() {
if *enableMetrics {
metrics := sf.NewMetrics()
- err := metrics.Start(net.JoinHostPort("localhost", strconv.Itoa(*metricsPort)))
+ err := metrics.Start(net.JoinHostPort(*metricsAddress, strconv.Itoa(*metricsPort)))
if err != nil {
log.Fatalf("could not enable metrics: %v", err)
}