From 5757a76c17b7906ecaf83868ffd0a072dfa4de74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20B=C3=B6ddeker?= Date: Fri, 15 Jul 2022 21:00:31 +0200 Subject: [PATCH] Fix broken LISTEN argument At the moment the example and the default for the LISTEN argument are broken, because the code expects an address and a port after splitting by : --- README.md | 2 +- tinyproxy_exporter | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b3080aa..817e7ad 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Prometheus exporter for Tinyproxy. optional arguments: -h, --help show this help message and exit - -l LISTEN address on which to expose metrics (default ":9240") + -l LISTEN address on which to expose metrics (default "127.0.0.1:9240") -s STATHOST internal statistics page address (default "tinyproxy.stats") -t TINYPROXY tinyproxy address (default "127.0.0.1:8888") ``` diff --git a/tinyproxy_exporter b/tinyproxy_exporter index 5016553..6608597 100755 --- a/tinyproxy_exporter +++ b/tinyproxy_exporter @@ -43,8 +43,8 @@ def parse_args(): parser.add_argument( '-l', metavar='LISTEN', - default=':9240', - help='address on which to expose metrics (default ":9240")') + default='127.0.0.1:9240', + help='address on which to expose metrics (default "127.0.0.1:9240")') parser.add_argument( '-s', metavar='STATHOST',