PROMETHEUS-PGBOUNCER-EXPORTER(1)

✨ prometheus-pgbouncer-exporter ✨

okay bestie, so this is a User Commands manual page for prometheus-pgbouncer-exporter and it is literally the little goblin that scoops up your pgbouncer metrics and hands them to Prometheus. it's giving matchmaker energy fr fr πŸ’–


🌸 NAME 🌸

prometheus-pgbouncer-exporter β€” Export metrics from pgbouncer to Prometheus πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

the usage is literally this, no cap, copy it exactly:

usage: prometheus-pgbouncer-exporter [-h] [--version] [-c CONFIG]
       [--port PORT] [--host HOST] [--pgbouncer-port PGBOUNCER_PORT]
       [--pgbouncer-user PGBOUNCER_USER] [--pgbouncer-host PGBOUNCER_HOST]
       [--database DATABASE] [--licence-location LICENCE_LOCATION]

so here's the tea πŸ«– β€” any arg that starts with -- (like --version) can also be set in a config file, and you point at that config file with -c. the config file syntax is chill with key=value, flag=true, and stuff=[a,b,c] β€” if you want the full details, the syntax lives at https://goo.gl/R74nmi.

and now the precedence lore, because this is the part people always get wrong 😭 if an arg shows up in more than one place, then:

  1. commandline values override
  2. environment variables
  3. config file values
  4. defaults

so commandline beats env vars, env vars beat the config file, and the config file beats the defaults. that's the whole chain, periodt. πŸ‘‘


πŸŽ€ optional arguments: πŸŽ€

  • -h, --help β€” show this help message and exit. classic. the "help me" button. πŸ™ˆ
  • --version β€” Show the version. it tells you what version you're on, iconic behaviour ✨
  • -c CONFIG, --config CONFIG β€” config file path [env var: CONFIG]. this is where you tell it which config file to read, bestie πŸ“
  • --port PORT β€” Port on which to expose metrics [env var: PORT]. the port where the metrics get served up πŸ“
  • --host HOST β€” Host on which to expose metrics [env var: HOST]. the host where the metrics get served up πŸ¦‹
  • --pgbouncer-port PGBOUNCER_PORT β€” Port to connect to pgbouncer [env var: PGBOUNCER_PORT]. the port it uses to reach pgbouncer πŸ”Œ
  • --pgbouncer-user PGBOUNCER_USER β€” User to connect to pgbouncer with [env var: PGBOUNCER_USER]. who you're logging in as πŸ‘€
  • --pgbouncer-host PGBOUNCER_HOST β€” Host on which to connect to pgbouncer [env var: PGBOUNCER_HOST]. the host where pgbouncer is actually living 🌈
  • --database DATABASE β€” Databases to report metrics for, if this is not specified, all metrics will be reported [env var: PGBOUNCER_DATABASES]. so if you leave this out, it just reports everything β€” main character energy, refusing to be selective πŸ’€
  • --licence-location LICENCE_LOCATION β€” The location of the licence, linked to through the web interface [env var: LICENCE_LOCATION]. yes it's spelled "licence" with a c, we don't make the rules πŸŽ€

lowkey important reminder: the precedence thing above is not a suggestion, it's the actual order. commandline > environment variables > config file > defaults. don't come for me when your env var doesn't win, bestie 😭

and that's the whole page, you ate that πŸ’… this was prometheus-pgbouncer-exporter... from November 2020, filed under PROMETHEUS-PGBOUNCER-EXPORTER(1). go forth and export your metrics, you absolute icon πŸ«Άβœ¨πŸ‘‘

πŸ“¦ where this page comes from