Browse Source

Merge remote-tracking branch 'origin/master' into feature/monitor-checks

bertyhell/feature/monitor-checks
Bert Verhelst 3 years ago
parent
commit
937df66eda
  1. 1
      server/database.js
  2. 2
      server/model/monitor.js
  3. 2
      server/server.js

1
server/database.js

@ -110,6 +110,7 @@ class Database {
await R.autoloadModels("./server/model"); await R.autoloadModels("./server/model");
R.modelList["monitor_checks"] = MonitorCheck; R.modelList["monitor_checks"] = MonitorCheck;
await R.exec("PRAGMA foreign_keys = ON");
// Change to WAL // Change to WAL
await R.exec("PRAGMA journal_mode = WAL"); await R.exec("PRAGMA journal_mode = WAL");
await R.exec("PRAGMA cache_size = -12000"); await R.exec("PRAGMA cache_size = -12000");

2
server/model/monitor.js

@ -313,7 +313,7 @@ class Monitor extends BeanModel {
if (bean.status === UP) { if (bean.status === UP) {
console.info(`Monitor #${this.id} '${this.name}': Successful Response: ${bean.ping} ms | Interval: ${beatInterval} seconds | Type: ${this.type}`); console.info(`Monitor #${this.id} '${this.name}': Successful Response: ${bean.ping} ms | Interval: ${beatInterval} seconds | Type: ${this.type}`);
} else if (bean.status === PENDING) { } else if (bean.status === PENDING) {
if (this.retryInterval !== this.interval) { if (this.retryInterval > 0) {
beatInterval = this.retryInterval; beatInterval = this.retryInterval;
} }
console.warn(`Monitor #${this.id} '${this.name}': Pending: ${bean.msg} | Max retries: ${this.maxretries} | Retry: ${retries} | Retry Interval: ${beatInterval} seconds | Type: ${this.type}`); console.warn(`Monitor #${this.id} '${this.name}': Pending: ${bean.msg} | Max retries: ${this.maxretries} | Retry: ${retries} | Retry Interval: ${beatInterval} seconds | Type: ${this.type}`);

2
server/server.js

@ -679,6 +679,8 @@ exports.entryPage = "dashboard";
}); });
await sendMonitorList(socket); await sendMonitorList(socket);
// Clear heartbeat list on client
await sendImportantHeartbeatList(socket, monitorID, true, true);
} catch (e) { } catch (e) {
callback({ callback({

Loading…
Cancel
Save