mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-03 03:56:18 -04:00
feat: Tailscale ping monitor (#3178)
* Add boilerplate for tailscale ping * tailscale initial commit draft * Refactor TailscalePing & better error handling Split check function into two methods and added async/await syntax for readability/modularity Switched to promise-based error handling (takes into account different types of error such as "Execution error", "Error in output", "no matching peer", and "is local Tailscale IP") and throws them as JavaScript errors. * Minor update * minor update (again) * Update server/monitor-types/tailscale-ping.js Co-authored-by: Frank Elsinga <frank@elsinga.de> * Update server/monitor-types/tailscale-ping.js Co-authored-by: Frank Elsinga <frank@elsinga.de> * Update server/monitor-types/tailscale-ping.js Co-authored-by: Frank Elsinga <frank@elsinga.de> * Update server/monitor-types/tailscale-ping.js Co-authored-by: Frank Elsinga <frank@elsinga.de> * timeout revision * JSDoc * Removed long explainers * eslint tailscale-ping.js --fix * reran eslint * Fix: Use hostname rather than url * Fixed NaN on monitor interval now interval value is correctly passed to runTailscalePing * Add warning message --------- Co-authored-by: Louis Lam <louislam@users.noreply.github.com> Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
ddbf367011
commit
1d9a28e9ab
4 changed files with 107 additions and 2 deletions
|
@ -99,6 +99,7 @@ class UptimeKumaServer {
|
|||
|
||||
// Set Monitor Types
|
||||
UptimeKumaServer.monitorTypeList["real-browser"] = new RealBrowserMonitorType();
|
||||
UptimeKumaServer.monitorTypeList["tailscale-ping"] = new TailscalePing();
|
||||
|
||||
this.io = new Server(this.httpServer);
|
||||
}
|
||||
|
@ -345,3 +346,4 @@ module.exports = {
|
|||
|
||||
// Must be at the end to avoid circular dependencies
|
||||
const { RealBrowserMonitorType } = require("./monitor-types/real-browser-monitor-type");
|
||||
const { TailscalePing } = require("./monitor-types/tailscale-ping");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue