5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-21 17:26:21 +00:00

realizar la limpieza mensualmente

This commit is contained in:
f 2022-04-15 10:57:51 -03:00
parent 170cbeb69e
commit 3b616198ea
4 changed files with 8 additions and 33 deletions

View file

@ -2,3 +2,4 @@
*
# Solo agregar lo que usamos en COPY
# !./archivo
!./monit.conf

View file

@ -15,6 +15,8 @@ RUN apk add --no-cache libxslt libxml2 postgresql-libs libssh2 \
RUN gem install --no-document --no-user-install foreman
RUN wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz -O - | tar --strip-components 1 -xvzf - pandoc-${PANDOC_VERSION}/bin/pandoc && mv /bin/pandoc /usr/bin/pandoc
COPY ./monit.conf /etc/monit.d/sutty.conf
VOLUME "/srv"
EXPOSE 3000

View file

@ -1,7 +1 @@
migrate: bundle exec rake db:prepare db:seed
sutty: bundle exec puma config.ru
blazer_5m: bundle exec rake blazer:run_checks SCHEDULE="5 minutes"
blazer_1h: bundle exec rake blazer:run_checks SCHEDULE="1 hour"
blazer_1d: bundle exec rake blazer:run_checks SCHEDULE="1 day"
blazer: bundle exec rake blazer:send_failing_checks
prometheus: bundle exec prometheus_exporter -b 0.0.0.0 --prefix "sutty_"
cleanup: rake cleanup:everything

View file

@ -1,27 +1,5 @@
check process sutty with pidfile /srv/tmp/puma.pid
start program = "/usr/local/bin/sutty start"
stop program = "/usr/local/bin/sutty stop"
check process prometheus with pidfile /tmp/prometheus.pid
start program = "/usr/local/bin/sutty prometheus start"
stop program = "/usr/local/bin/sutty prometheus start"
check program blazer_5m
with path "/usr/local/bin/sutty blazer 5m"
every 5 cycles
if status != 0 then alert
check program blazer_1h
with path "/usr/local/bin/sutty blazer 1h"
every 60 cycles
if status != 0 then alert
check program blazer_1d
with path "/usr/local/bin/sutty blazer 1d"
every 1440 cycles
if status != 0 then alert
check program blazer
with path "/usr/local/bin/sutty blazer"
every 61 cycles
# Limpiar mensualmente
check program cleanup
with path "/usr/bin/foreman run -f /srv/Procfile -d /srv " as uid "rails" gid "http-data"
every "0 3 1 * *"
if status != 0 then alert