mirror of
https://github.com/waku-org/nwaku.git
synced 2025-01-27 07:06:42 +00:00
Fix: metrics-server use after submodule update (#610)
* Fix: metrics-server use after submodule update * Remove insecure check
This commit is contained in:
parent
0fe7d60891
commit
a8da4dfd6b
@ -1,6 +1,7 @@
|
||||
import
|
||||
std/[tables, times, strutils, hashes, sequtils],
|
||||
chronos, confutils, chronicles, chronicles/topics_registry, metrics,
|
||||
chronos, confutils, chronicles, chronicles/topics_registry,
|
||||
metrics, metrics/chronos_httpserver,
|
||||
stew/[byteutils, endians2],
|
||||
stew/shims/net as stewNet, json_rpc/rpcserver,
|
||||
# Matterbridge client imports
|
||||
@ -278,12 +279,11 @@ when isMainModule:
|
||||
|
||||
rpcServer.start()
|
||||
|
||||
when defined(insecure):
|
||||
if conf.metricsServer:
|
||||
let
|
||||
address = conf.metricsServerAddress
|
||||
port = conf.metricsServerPort + conf.portsShift
|
||||
info "Starting metrics HTTP server", address, port
|
||||
metrics.startHttpServer($address, Port(port))
|
||||
if conf.metricsServer:
|
||||
let
|
||||
address = conf.metricsServerAddress
|
||||
port = conf.metricsServerPort + conf.portsShift
|
||||
info "Starting metrics HTTP server", address, port
|
||||
startMetricsHttpServer($address, Port(port))
|
||||
|
||||
runForever()
|
||||
|
@ -1,6 +1,7 @@
|
||||
import
|
||||
std/[tables, hashes, sequtils],
|
||||
chronos, confutils, chronicles, chronicles/topics_registry, metrics,
|
||||
chronos, confutils, chronicles, chronicles/topics_registry,
|
||||
metrics, metrics/chronos_httpserver,
|
||||
stew/[byteutils, objects],
|
||||
stew/shims/net as stewNet, json_rpc/rpcserver,
|
||||
# Waku v1 imports
|
||||
@ -284,12 +285,11 @@ when isMainModule:
|
||||
|
||||
rpcServer.start()
|
||||
|
||||
when defined(insecure):
|
||||
if conf.metricsServer:
|
||||
let
|
||||
address = conf.metricsServerAddress
|
||||
port = conf.metricsServerPort + conf.portsShift
|
||||
info "Starting metrics HTTP server", address, port
|
||||
metrics.startHttpServer($address, Port(port))
|
||||
if conf.metricsServer:
|
||||
let
|
||||
address = conf.metricsServerAddress
|
||||
port = conf.metricsServerPort + conf.portsShift
|
||||
info "Starting metrics HTTP server", address, port
|
||||
startMetricsHttpServer($address, Port(port))
|
||||
|
||||
runForever()
|
||||
|
@ -1,5 +1,6 @@
|
||||
import
|
||||
confutils, chronos, json_rpc/rpcserver, metrics, metrics/chronicles_support,
|
||||
confutils, chronos, json_rpc/rpcserver,
|
||||
metrics, metrics/chronicles_support, metrics/chronos_httpserver,
|
||||
stew/shims/net as stewNet,
|
||||
eth/[keys, p2p], eth/common/utils,
|
||||
eth/p2p/[discovery, enode, peer_pool, bootnodes, whispernodes],
|
||||
@ -98,13 +99,12 @@ proc run(config: WakuNodeConf, rng: ref BrHmacDrbgContext) =
|
||||
discard setTimer(Moment.fromNow(2.seconds), logPeerAccounting)
|
||||
discard setTimer(Moment.fromNow(2.seconds), logPeerAccounting)
|
||||
|
||||
when defined(insecure):
|
||||
if config.metricsServer:
|
||||
let
|
||||
address = config.metricsServerAddress
|
||||
port = config.metricsServerPort + config.portsShift
|
||||
info "Starting metrics HTTP server", address, port
|
||||
metrics.startHttpServer($address, Port(port))
|
||||
if config.metricsServer:
|
||||
let
|
||||
address = config.metricsServerAddress
|
||||
port = config.metricsServerPort + config.portsShift
|
||||
info "Starting metrics HTTP server", address, port
|
||||
startMetricsHttpServer($address, Port(port))
|
||||
|
||||
if config.logMetrics:
|
||||
# https://github.com/nim-lang/Nim/issues/17369
|
||||
|
@ -781,10 +781,9 @@ when isMainModule:
|
||||
if conf.metricsLogging:
|
||||
startMetricsLog()
|
||||
|
||||
when defined(insecure):
|
||||
if conf.metricsServer:
|
||||
startMetricsServer(conf.metricsServerAddress,
|
||||
Port(conf.metricsServerPort + conf.portsShift))
|
||||
if conf.metricsServer:
|
||||
startMetricsServer(conf.metricsServerAddress,
|
||||
Port(conf.metricsServerPort + conf.portsShift))
|
||||
|
||||
# Setup graceful shutdown
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user