fix(monitor): mark monitor as down when one check fails, up if no checks

This commit is contained in:
Bert Verhelst 2021-10-09 11:01:07 +02:00
parent bb5f9a0dbd
commit 296ca50d5b
2 changed files with 2 additions and 1 deletions

View file

@ -273,7 +273,7 @@ class Monitor extends BeanModel {
retries = 0; retries = 0;
} catch (error) { } catch (error) {
bean.status = DOWN;
bean.msg = error.message; bean.msg = error.message;
// If UP come in here, it must be upside down mode // If UP come in here, it must be upside down mode

View file

@ -101,6 +101,7 @@ function validateMonitorChecks(res, checks, bean) {
throw new Error(`${bean.msg}, encountered unknown monitor_check.type`); throw new Error(`${bean.msg}, encountered unknown monitor_check.type`);
} }
}); });
bean.status = UP;
} }
module.exports = validateMonitorChecks; module.exports = validateMonitorChecks;