Compare commits
No commits in common. "39127b267d92dabeaafdaa7bf9ad3c8614b39e59" and "80c2b201c46c96b06f115f0710be42ba45e170f9" have entirely different histories.
39127b267d
...
80c2b201c4
4 changed files with 4 additions and 40 deletions
|
@ -30,6 +30,3 @@ matrix:
|
||||||
- ALPINE_VERSION: 3.15.4
|
- ALPINE_VERSION: 3.15.4
|
||||||
RUBY_VERSION: 3.0
|
RUBY_VERSION: 3.0
|
||||||
RUBY_PATCH: 4
|
RUBY_PATCH: 4
|
||||||
- ALPINE_VERSION: 3.16.0
|
|
||||||
RUBY_VERSION: 3.1
|
|
||||||
RUBY_PATCH: 2
|
|
||||||
|
|
2
Procfile
2
Procfile
|
@ -5,4 +5,4 @@ blazer_5m: bundle exec rake blazer:run_checks SCHEDULE="5 minutes"
|
||||||
blazer_1h: bundle exec rake blazer:run_checks SCHEDULE="1 hour"
|
blazer_1h: bundle exec rake blazer:run_checks SCHEDULE="1 hour"
|
||||||
blazer_1d: bundle exec rake blazer:run_checks SCHEDULE="1 day"
|
blazer_1d: bundle exec rake blazer:run_checks SCHEDULE="1 day"
|
||||||
blazer: bundle exec rake blazer:send_failing_checks
|
blazer: bundle exec rake blazer:send_failing_checks
|
||||||
prometheus: bundle exec prometheus_exporter -b ::
|
prometheus: bundle exec prometheus_exporter -b 0.0.0.0 --prefix "lunar_"
|
||||||
|
|
|
@ -18,17 +18,17 @@ case $1 in
|
||||||
|
|
||||||
;;
|
;;
|
||||||
prometheus)
|
prometheus)
|
||||||
|
rm -f /tmp/prometheus.pid
|
||||||
|
|
||||||
daemonize -c /srv \
|
daemonize -c /srv \
|
||||||
-p /tmp/prometheus.pid \
|
-p /tmp/prometheus.pid \
|
||||||
-l /tmp/prometheus.pid \
|
-l /tmp/prometheus.pid \
|
||||||
-u rails \
|
-u rails \
|
||||||
/usr/local/bin/syslogize \
|
|
||||||
/usr/bin/foreman start -f /etc/Procfile -d /srv prometheus
|
/usr/bin/foreman start -f /etc/Procfile -d /srv prometheus
|
||||||
;;
|
;;
|
||||||
|
|
||||||
prometheus-stop)
|
prometheus-stop)
|
||||||
test ! -f /tmp/prometheus.pid || cat /tmp/prometheus.pid | xargs -r kill
|
cat /tmp/prometheus.pid | xargs -r kill
|
||||||
rm -f /tmp/prometheus.pid
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
33
syslogize.sh
33
syslogize.sh
|
@ -1,33 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# A wrapper for programs that can't write to syslog. Output and error
|
|
||||||
# are sent to syslog.
|
|
||||||
#
|
|
||||||
# Use LOGGER environment variable to pass options to `logger`. They'll
|
|
||||||
# probably be system-dependent, so handle with care.
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
#
|
|
||||||
# LOGGER="-t program" syslogize program -o -p --tions argu ments
|
|
||||||
#
|
|
||||||
# daemonize /usr/local/bin/syslogize program
|
|
||||||
|
|
||||||
if test $# -eq 0 ; then
|
|
||||||
grep "^#" $0 | grep -v /bin/sh | sed -re "s/^#\s*//" >&2
|
|
||||||
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
LOGGER="${LOGGER:--t $1}"
|
|
||||||
|
|
||||||
propagate_signal () {
|
|
||||||
logger ${LOGGER} "Received $1 signal"
|
|
||||||
jobs -p | xargs kill -$1
|
|
||||||
}
|
|
||||||
|
|
||||||
for signal in HUP INT QUIT USR1 USR2 TERM; do
|
|
||||||
trap "propagate_signal ${signal}" ${signal}
|
|
||||||
done
|
|
||||||
|
|
||||||
$@ 2>&1 | logger ${LOGGER} &
|
|
||||||
|
|
||||||
wait $!
|
|
Loading…
Reference in a new issue