Skip to content

Commit

Permalink
Merge pull request #159 from rsommer/add_cli_env_vars
Browse files Browse the repository at this point in the history
Allow connection config via environment variable
  • Loading branch information
SuperQ authored Aug 1, 2024
2 parents 480a6a2 + 461c186 commit 18bf376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pgbouncer_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func main() {
flag.AddFlags(kingpin.CommandLine, promlogConfig)

var (
connectionStringPointer = kingpin.Flag("pgBouncer.connectionString", "Connection string for accessing pgBouncer.").Default("postgres://postgres:@localhost:6543/pgbouncer?sslmode=disable").String()
connectionStringPointer = kingpin.Flag("pgBouncer.connectionString", "Connection string for accessing pgBouncer.").Default("postgres://postgres:@localhost:6543/pgbouncer?sslmode=disable").Envar("PGBOUNCER_EXPORTER_CONNECTION_STRING").String()
metricsPath = kingpin.Flag("web.telemetry-path", "Path under which to expose metrics.").Default("/metrics").String()
pidFilePath = kingpin.Flag("pgBouncer.pid-file", pidFileHelpText).Default("").String()
)
Expand Down

0 comments on commit 18bf376

Please sign in to comment.