Skip to content

Commit

Permalink
Allow passing in host bind address to stats daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Carroll committed Oct 6, 2014
1 parent df6a37b commit 3f4bd0b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/zk-stats-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ app.add_option("--http-port",
type=int,
default=7070,
help="listen port for http endpoints")
app.add_option("--http-address",
dest="http_addr",
metavar="HTTPADDR",
type=str,
default=socket.gethostname(),
help="listen address for http endpoints")
app.add_option("--zookeeper-port",
type=int,
default=2181,
Expand Down Expand Up @@ -87,7 +93,7 @@ def main(_, opts):

server = Server()
server.mount_routes(stats)
server.run(socket.gethostname(), opts.http_port)
server.run(opts.http_addr, opts.http_port)

while True:
time.sleep(10)
Expand Down

0 comments on commit 3f4bd0b

Please sign in to comment.