aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsigsum-witness.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/sigsum-witness.py b/sigsum-witness.py
index 1a565b8..87e073e 100755
--- a/sigsum-witness.py
+++ b/sigsum-witness.py
@@ -120,7 +120,15 @@ class Parser:
const=logging.DEBUG,
default=logging.INFO,
dest="log_level",
- help="Log base URL ({})".format(BASE_URL_DEFAULT),
+ help="Increase verbosity",
+ )
+
+ p.add_argument(
+ "--metrics-port",
+ action="store",
+ type=int,
+ default=8000,
+ help="Port of the HTTP server to expose Prometheus metrics.",
)
self.parser = p
@@ -599,8 +607,8 @@ def main(args):
"ERROR: Valid tree head found: --bootstrap-log not allowed")
# Start up the server to expose the metrics.
- LOGGER.info("Starting metrics server on port 8000")
- prometheus.start_http_server(8000)
+ LOGGER.info(f"Starting metrics server on port {g_args.metrics_port}")
+ prometheus.start_http_server(g_args.metrics_port)
LOGGER.info("Starting witness")
thread = Witness(signing_key, log_verification_key, cur_tree_head)