15 lines
358 B
Bash
15 lines
358 B
Bash
#!/usr/bin/env sh
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
|
|
if [ -d /etc/prometheus/conf.d ]; then
|
|
# shellcheck disable=SC2016
|
|
yq eval-all '. as $item ireduce ({}; . *+ $item)' /etc/prometheus/conf.d/*.yaml > /etc/prometheus/prometheus.yaml
|
|
fi
|
|
|
|
exec prometheus \
|
|
--config.file=/etc/prometheus/prometheus.yaml \
|
|
--storage.tsdb.path=/var/lib/prometheus \
|
|
"$@"
|