aboutsummaryrefslogtreecommitdiffstats
path: root/databases/prometheus-postgres-exporter/files/postgres_exporter.in
diff options
context:
space:
mode:
authorLexi Winter <ivy@FreeBSD.org>2025-12-01 03:19:41 +0000
committerLexi Winter <ivy@FreeBSD.org>2025-12-01 03:19:41 +0000
commit2e80774d0b20d167bc0a9e2b63dafbfb171c0d22 (patch)
tree25f0138e1af8902b92dacc8cce09b267447c17db /databases/prometheus-postgres-exporter/files/postgres_exporter.in
parentf85f2b2d6e5b7ed869376eb4b180c3a74a5c5da9 (diff)
parent1a30da80670973368b399f2b01fe9c04b91a1273 (diff)
Merge remote-tracking branch 'freebsd/main' into lf/mainlf/main
Diffstat (limited to 'databases/prometheus-postgres-exporter/files/postgres_exporter.in')
-rw-r--r--databases/prometheus-postgres-exporter/files/postgres_exporter.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/databases/prometheus-postgres-exporter/files/postgres_exporter.in b/databases/prometheus-postgres-exporter/files/postgres_exporter.in
index e96e638fa152..e6c0f93fdfc9 100644
--- a/databases/prometheus-postgres-exporter/files/postgres_exporter.in
+++ b/databases/prometheus-postgres-exporter/files/postgres_exporter.in
@@ -17,6 +17,10 @@
# Default is "nobody".
# postgres_exporter_args (string): Set extra arguments to pass to postgres_exporter
# Default is "".
+# postgres_exporter_env (string) Set environment passed to postgres_exporter.
+# A series of VAR=value pairs. If not using multi-target mode,
+# this may be used to set the target DSN via $DATA_SOURCE_URI.
+# Default is "".
# postgres_exporter_listen_address (string):Set ip:port that postgres_exporter will listen on
# Default is "localhost:9187".
# postgres_exporter_syslog_output_tag (str): Set syslog tag.
@@ -39,6 +43,7 @@ load_rc_config $name
: ${postgres_exporter_user:="nobody"}
: ${postgres_exporter_group:="nobody"}
: ${postgres_exporter_args:=""}
+: ${postgres_exporter_env:=""}
: ${postgres_exporter_listen_address:="localhost:9187"}
: ${postgres_exporter_syslog_output_tag=${name}}
: ${postgres_exporter_syslog_output_priority=notice}
@@ -51,7 +56,7 @@ command_args="-f -p ${pidfile} -t ${name} \
-T ${postgres_exporter_syslog_output_tag} \
-s ${postgres_exporter_syslog_output_priority} \
-l ${postgres_exporter_syslog_output_facility} \
- /usr/bin/env ${procname} \
+ /usr/bin/env ${postgres_exporter_env} ${procname} \
--web.listen-address=${postgres_exporter_listen_address} \
--config.file=${postgres_exporter_config_file} \
${postgres_exporter_args}"