|
|
@ -39,7 +39,8 @@ class TailscalePing extends MonitorType {
|
|
|
|
async runTailscalePing(hostname, interval) {
|
|
|
|
async runTailscalePing(hostname, interval) {
|
|
|
|
let timeout = interval * 1000 * 0.8;
|
|
|
|
let timeout = interval * 1000 * 0.8;
|
|
|
|
let res = await childProcessAsync.spawn("tailscale", [ "ping", "--c", "1", hostname ], {
|
|
|
|
let res = await childProcessAsync.spawn("tailscale", [ "ping", "--c", "1", hostname ], {
|
|
|
|
timeout: timeout
|
|
|
|
timeout: timeout,
|
|
|
|
|
|
|
|
encoding: "utf8",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
if (res.stderr && res.stderr.toString()) {
|
|
|
|
if (res.stderr && res.stderr.toString()) {
|
|
|
|
throw new Error(`Error in output: ${res.stderr.toString()}`);
|
|
|
|
throw new Error(`Error in output: ${res.stderr.toString()}`);
|
|
|
|