aboutsummaryrefslogtreecommitdiff
path: root/prometheus_pgbouncer_exporter/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'prometheus_pgbouncer_exporter/cli.py')
-rw-r--r--prometheus_pgbouncer_exporter/cli.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/prometheus_pgbouncer_exporter/cli.py b/prometheus_pgbouncer_exporter/cli.py
index 4f55f1e..91bbd0a 100644
--- a/prometheus_pgbouncer_exporter/cli.py
+++ b/prometheus_pgbouncer_exporter/cli.py
@@ -75,6 +75,12 @@ def main():
env_var='PGBOUNCER_USER',
)
p.add(
+ '--pgbouncer-password',
+ default=None,
+ help="Password to connect to pgbouncer with",
+ env_var='PGBOUNCER_PASSWORD',
+ )
+ p.add(
'--pgbouncer-host',
default=None,
help="Host on which to connect to pgbouncer",
@@ -106,9 +112,10 @@ def main():
logging.info(p.format_values())
connection = get_connection(
- options.pgbouncer_user,
- options.pgbouncer_port,
- options.pgbouncer_host,
+ user = options.pgbouncer_user,
+ port = options.pgbouncer_port,
+ host = options.pgbouncer_host,
+ password = options.pgbouncer_password,
)
REGISTRY.register(StatsCollector(