Skip to content

Commit

Permalink
listen on a given port
Browse files Browse the repository at this point in the history
  • Loading branch information
dsp committed May 24, 2016
1 parent 0271920 commit db52e50
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mprom/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ def ice_connect(host, port):

def main():
parser = argparse.ArgumentParser(description='Prometheus statistics for a Mumble ICE interface')
parser.add_argument('-l', '--listen', help='Port to listen on', default=9123, type=int)
parser.add_argument('-H', '--host', help='Host of the Ice interface', default='127.0.0.1')
parser.add_argument('-p', '--port', help='Port of the Ice interface', default=6502)
parser.add_argument('-i', '--interval', help='Interval in seconds', default=60)
parser.add_argument('-p', '--port', help='Port of the Ice interface', default=6502, type=int)
parser.add_argument('-i', '--interval', help='Interval in seconds', default=60, type=int)
args = parser.parse_args()

node.start_http_server(8001)
node.start_http_server(args.listen)

g = node.Gauge('users_connected', 'Number of connected users')
while True:
Expand Down

0 comments on commit db52e50

Please sign in to comment.