Commit Graph

67 Commits

Author SHA1 Message Date
Girish Ramakrishnan
dd0fb8292c Move state enums to the model code 2019-08-30 13:21:51 -07:00
Girish Ramakrishnan
e29d224a92 Be a bit more specific 2019-07-31 15:45:25 -07:00
Girish Ramakrishnan
bb48ffb01f Fixup UA for easier detection (other than IP) 2019-07-31 15:43:15 -07:00
Girish Ramakrishnan
d752c68790 re-factor all the audit source objects 2019-03-25 15:15:39 -07:00
Girish Ramakrishnan
8d7f7cb438 rename the constant 2019-03-06 15:55:07 -08:00
Girish Ramakrishnan
b5a4121574 Better OOM notification messages 2019-03-06 14:47:24 -08:00
Girish Ramakrishnan
59ff3998bc do not send up mails immediately on installation 2019-02-13 14:44:02 -08:00
Girish Ramakrishnan
9471dc27e0 App can also be dead/error 2019-02-12 17:01:45 -08:00
Girish Ramakrishnan
5980ab9b69 Add healthTime in the database
this is currently an internal field and not returned in API
2019-02-12 16:33:28 -08:00
Girish Ramakrishnan
70e5daf8c6 Fix usage of audit source 2019-02-11 14:41:12 -08:00
Girish Ramakrishnan
2236e07722 Send app up notification
Fixes #438
2019-02-11 12:58:33 -08:00
Girish Ramakrishnan
c0b929035f lint 2019-01-23 21:00:26 -08:00
Johannes Zellner
701024cf80 Send app down notification through eventlog 2019-01-17 17:26:58 +01:00
Johannes Zellner
4ecb0d82e7 Handle oom notification through eventlog 2019-01-17 15:31:34 +01:00
Johannes Zellner
85ea9b3255 Rework the oom notification 2019-01-08 14:37:58 +01:00
Johannes Zellner
5f71f6987c Create notifications for app down event 2019-01-07 13:01:27 +01:00
Johannes Zellner
86dbb1bdcf Create notification for oom events 2019-01-07 12:57:57 +01:00
Girish Ramakrishnan
a536e9fc4b track last oom time using a global variable
because it was a local variable, we were just sending out oom mails
like crazy

also, fixes an issue that if docker.getEvents gets stuck because
docker does not respond then we do not do any health monitoring.
i guess this can happen if the docker API gets stuck.
2018-12-16 20:52:42 -08:00
Girish Ramakrishnan
a49969f2be Move apphealthmonitor into a cron job
This makes sure that it only runs post activation

See also a9c1af50f7
2018-10-22 20:08:49 -07:00
Girish Ramakrishnan
630fbb373c healthCheckPath is optional for non-appstore apps 2018-10-11 13:20:31 -07:00
Johannes Zellner
b6384d5025 Remove intrinsicFqdn 2018-02-08 15:07:49 +01:00
Johannes Zellner
8f74cacfd0 Remove unused require 2018-02-05 20:45:53 +01:00
Girish Ramakrishnan
efc0a3b68d Remove usage of config.appFqdn() 2018-01-10 13:58:05 -08:00
Johannes Zellner
e43e904622 Refactor all app.location usages to config.appFqdn(app) 2017-11-20 20:01:50 +01:00
Girish Ramakrishnan
afed3f3725 Remove duplicate debug 2017-10-04 15:08:26 -07:00
Dennis Schwerdel
e3f3241966 Added user agent to health checks 2017-10-04 13:05:00 +02:00
Girish Ramakrishnan
5afef14760 Actually send emails for responsive apps 2017-03-14 13:42:28 -07:00
Girish Ramakrishnan
9b6c6dc709 doc: base image 0.10.0 2017-02-16 09:20:27 -08:00
Girish Ramakrishnan
e35dbd522f More debugMode fixes 2017-01-20 09:56:44 -08:00
Girish Ramakrishnan
a71323f8b3 Add developmentMode flag to appdb
Part of #171
2017-01-19 15:57:24 -08:00
Johannes Zellner
d392293b50 Remove unused require 2017-01-17 16:32:22 +01:00
Johannes Zellner
16371d4528 Use the apps.js layer instead of the raw appdb in apphealthmonitor.js 2017-01-17 16:32:12 +01:00
Johannes Zellner
eaac13b1c1 app.fqdn already takes care of altDomain 2017-01-17 16:01:10 +01:00
Johannes Zellner
1888319313 Send altDomain as Host header if it is set
At least nextcloud will respond with 400 if the Host header is not
matching
2017-01-12 10:45:16 +01:00
Girish Ramakrishnan
3f3b97dc16 Send oom email to cloudron admins
Part of #166
2017-01-07 13:52:33 -08:00
Girish Ramakrishnan
36f7e573a8 change base image version 2016-08-21 21:03:15 -07:00
Girish Ramakrishnan
03022f0207 Do not send more than 1 oom mail every hour 2016-07-25 14:19:20 -07:00
Girish Ramakrishnan
338f4bcdea docker event stream can be null if it errored 2016-07-25 11:39:32 -07:00
Girish Ramakrishnan
e46b1a9245 test for app instead of error 2016-07-25 11:37:30 -07:00
Girish Ramakrishnan
814a0ce3a6 wait for 10mins before sending out emails about app being down 2016-06-11 18:36:38 -07:00
Girish Ramakrishnan
d87b7dcb75 fix typo 2016-04-20 12:56:35 -07:00
Johannes Zellner
17deac756b Also log app manifest id for alive apps 2016-03-03 09:30:46 +01:00
Johannes Zellner
f7bb3bac98 Log app manifest id in healthmonitor 2016-03-03 09:30:46 +01:00
Johannes Zellner
9ddd3aeb07 Show app id and fix naked domain in debugApp() 2016-02-18 12:51:25 +01:00
Johannes Zellner
9bf1fe3b7d Show naked_domain for healthtask summary 2016-02-14 17:42:52 +01:00
girish@cloudron.io
fa871c7ada some apache configs require Host header to be set 2016-02-03 20:18:59 -08:00
Girish Ramakrishnan
aa34850d4e fix typo 2015-12-15 12:52:41 -08:00
Girish Ramakrishnan
a4ea693c3c update superagent
the latest superchanged changed the meaning of 'error'. Previously,
error implied a network error. With the latest superagent, error means
a REST api error i.e 4xx, 5xx are flagged as errors.

error && !error.response means network error
2015-12-15 09:53:37 -08:00
Johannes Zellner
d89db24bfc Fix indentantion 2015-11-13 09:30:33 +01:00
Girish Ramakrishnan
0cef3e1090 do not trust the health state blindly 2015-11-12 16:16:05 -08:00