community/prometheus: allow adding args via conf.d

eg. --web.listen-address cannot be provided in the config file, so a
mechanism to modify the command line is necessary
This commit is contained in:
Lauri Tirkkonen 2023-03-16 09:53:32 +09:00 committed by psykose
parent 415377ff74
commit 0be0803b1f
3 changed files with 5 additions and 3 deletions

View File

@ -86,6 +86,6 @@ package() {
sha512sums="
5af1c6489f82f977d2ebc8ed51dded4ac941d723765299723059936f64c07ba090130b9e2936a3170534957f8905093517625110527f060e498fcb37a48a3a4c prometheus-2.42.0.tar.gz
eb0cebe41782f90079f367832f7c9efa18b99df410506b65b2e0b11fa05f8f2956f68c0fca836664729d50b85fc969a96e99e1d32012fe3c655cddc0b16a7561 prometheus.initd
24b34e586238d5b331639aa5c43b6a927692f251af2cea2787335eab30d2fc7d46975059595db4697ae0dc1d35b5e23cfc4e4b2e424442c209a05283ca22a239 prometheus.confd
f4c222ba836f65d874fb30c62c7a55c27c4cedd6c473e39808a84bb7b4353c79c6ff3cefd3c4cf2ce966ce3a1234db3343cba397c83328ccc4e25072f683fcf5 prometheus.initd
2e47a19e313cbf64f7a57a15de4bea959f5b1c307ef0c2b7f6b254f4abc5504b6ae31b02a1e11487fd82bc975f1cd8e1f3733393823b007f375acbdaf17af8ea prometheus.confd
"

View File

@ -1,6 +1,7 @@
prometheus_config_file=/etc/prometheus/prometheus.yml
prometheus_storage_path=/var/lib/prometheus/data
prometheus_retention_time=15d
prometheus_args=""
output_log=/var/log/prometheus.log
error_log=/var/log/prometheus.log

View File

@ -5,7 +5,8 @@ supervisor=supervise-daemon
command=/usr/bin/prometheus
command_args="--config.file=$prometheus_config_file \
--storage.tsdb.path=$prometheus_storage_path \
--storage.tsdb.retention.time=$prometheus_retention_time"
--storage.tsdb.retention.time=$prometheus_retention_time
$prometheus_args"
command_user="prometheus:prometheus"
extra_started_commands="reload"