mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-07 13:32:35 +02:00
fix(monitor): mark monitor as down when one check fails, up if no checks
This commit is contained in:
parent
bb5f9a0dbd
commit
296ca50d5b
2 changed files with 2 additions and 1 deletions
|
@ -273,7 +273,7 @@ class Monitor extends BeanModel {
|
|||
retries = 0;
|
||||
|
||||
} catch (error) {
|
||||
|
||||
bean.status = DOWN;
|
||||
bean.msg = error.message;
|
||||
|
||||
// If UP come in here, it must be upside down mode
|
||||
|
|
|
@ -101,6 +101,7 @@ function validateMonitorChecks(res, checks, bean) {
|
|||
throw new Error(`${bean.msg}, encountered unknown monitor_check.type`);
|
||||
}
|
||||
});
|
||||
bean.status = UP;
|
||||
}
|
||||
|
||||
module.exports = validateMonitorChecks;
|
||||
|
|
Loading…
Add table
Reference in a new issue