From 67b232c6260fa9156a48cfed6747aeb248a9bb76 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 29 May 2020 15:03:24 -0300 Subject: [PATCH] chequeos de blazer --- Procfile | 4 ++++ config/blazer.yml | 2 +- monit.conf | 24 ++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Procfile b/Procfile index 0b9409e3..d692266a 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1,6 @@ migrate: bundle exec rake db:prepare db:seed sutty: bundle exec puma -d 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 diff --git a/config/blazer.yml b/config/blazer.yml index 14501c81..2ba0965f 100644 --- a/config/blazer.yml +++ b/config/blazer.yml @@ -71,7 +71,7 @@ override_csp: true # enable forecasting # note: with trend, time series are sent to https://trendapi.org -# forecasting: trend +# forecasting: prophet # enable map # mapbox_access_token: <%= ENV["MAPBOX_ACCESS_TOKEN"] %> diff --git a/monit.conf b/monit.conf index b612016b..c2879cb4 100644 --- a/monit.conf +++ b/monit.conf @@ -6,3 +6,27 @@ check process sutty with pidfile /srv/http/tmp/puma.pid check program sync_assets with path /usr/local/bin/sync_assets if status = 0 then unmonitor + +check program blazer_5m + with path "/bin/sh -c 'cd /srv/http && foreman start blazer_5m'" + as uid "app" and gid "www-data" + every 5 cycles + if status != 0 then alert + +check program blazer_1h + with path "/bin/sh -c 'cd /srv/http && foreman start blazer_1h'" + as uid "app" and gid "www-data" + every 60 cycles + if status != 0 then alert + +check program blazer_1d + with path "/bin/sh -c 'cd /srv/http && foreman start blazer_1d'" + as uid "app" and gid "www-data" + every 1440 cycles + if status != 0 then alert + +check program blazer + with path "/bin/sh -c 'cd /srv/http && foreman start blazer'" + as uid "app" and gid "www-data" + every 61 cycles + if status != 0 then alert