Skip to content

Commit

Permalink
barman prom-exporter: configurable http port
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Hoss committed Sep 28, 2017
1 parent 611f306 commit a009e80
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/prom_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ def collect(self):

if __name__ == '__main__':
# Start up the server to expose the metrics.
start_http_server(8000)
exporter_port = int(os.getenv("BARMAN_EXPORTER_PORT", 8000))
start_http_server(exporter_port)
print "prom_exporter started, listening on port: {}".format(exporter_port)
# Generate some requests.
while True:
time.sleep(10000)

0 comments on commit a009e80

Please sign in to comment.