From 6961b1bdd26877614c5aeab4b7b33083b4da80b3 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Wed, 18 Jan 2023 09:53:04 +0800 Subject: [PATCH 1/4] Fix: Use default timeout & CachebleDnsHttpsAgent --- server/model/monitor.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index e5e911af..28fae9e6 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -495,13 +495,17 @@ class Monitor extends BeanModel { const options = { url: `/containers/${this.docker_container}/json`, + timeout: this.interval * 1000 * 0.8, headers: { "Accept": "*/*", "User-Agent": "Uptime-Kuma/" + version, }, - httpsAgent: new https.Agent({ + httpsAgent: CacheableDnsHttpAgent.getHttpsAgent({ maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940) - rejectUnauthorized: ! this.getIgnoreTls(), + rejectUnauthorized: !this.getIgnoreTls(), + }), + httpAgent: CacheableDnsHttpAgent.getHttpAgent({ + maxCachedSessions: 0, }), }; From 6cd6a2edf0f5889f619b75dc17ec2594894fa3c1 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 19 Jan 2023 02:16:07 +0800 Subject: [PATCH 2/4] Fix ping issue on Windows #2636 --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index fbfcebe6..33ce6af7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "uptime-kuma", - "version": "1.19.4", + "version": "1.19.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "uptime-kuma", - "version": "1.19.4", + "version": "1.19.5", "license": "MIT", "dependencies": { "@grpc/grpc-js": "~1.7.3", - "@louislam/ping": "~0.4.2-mod.0", + "@louislam/ping": "~0.4.2-mod.1", "@louislam/sqlite3": "15.1.2", "args-parser": "~1.3.0", "axios": "~0.27.0", @@ -3133,9 +3133,9 @@ "integrity": "sha512-oTFmkyv5MhgkHdZhoe5lwRoKW0t4njPvK3g7ODvK/prkoC5bwylKcyQJMsmjvgHBXoy4u5iLnB5yQ7AljouHAA==" }, "node_modules/@louislam/ping": { - "version": "0.4.2-mod.0", - "resolved": "https://registry.npmjs.org/@louislam/ping/-/ping-0.4.2-mod.0.tgz", - "integrity": "sha512-cyHnJHsMkC+sFU32GBzX5SlwdTb+BIBlwsdwsDm+AS9jcS1sz7JPBrdCStqpNkVn5lUUQZ7Ak5DRwlWuwJOYAg==", + "version": "0.4.2-mod.1", + "resolved": "https://registry.npmjs.org/@louislam/ping/-/ping-0.4.2-mod.1.tgz", + "integrity": "sha512-KkRDo8qcF9kzzR0Hh8Iqz+XNnzKOdobUquP7UyBYrjxAB1jNT3qO0gvAZeDUknF28LXBPSzkiVlf1NG+tb/iyQ==", "dependencies": { "command-exists": "~1.2.9", "q": "1.x", @@ -19360,9 +19360,9 @@ "integrity": "sha512-oTFmkyv5MhgkHdZhoe5lwRoKW0t4njPvK3g7ODvK/prkoC5bwylKcyQJMsmjvgHBXoy4u5iLnB5yQ7AljouHAA==" }, "@louislam/ping": { - "version": "0.4.2-mod.0", - "resolved": "https://registry.npmjs.org/@louislam/ping/-/ping-0.4.2-mod.0.tgz", - "integrity": "sha512-cyHnJHsMkC+sFU32GBzX5SlwdTb+BIBlwsdwsDm+AS9jcS1sz7JPBrdCStqpNkVn5lUUQZ7Ak5DRwlWuwJOYAg==", + "version": "0.4.2-mod.1", + "resolved": "https://registry.npmjs.org/@louislam/ping/-/ping-0.4.2-mod.1.tgz", + "integrity": "sha512-KkRDo8qcF9kzzR0Hh8Iqz+XNnzKOdobUquP7UyBYrjxAB1jNT3qO0gvAZeDUknF28LXBPSzkiVlf1NG+tb/iyQ==", "requires": { "command-exists": "~1.2.9", "q": "1.x", diff --git a/package.json b/package.json index bfd03b33..d9646efc 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ }, "dependencies": { "@grpc/grpc-js": "~1.7.3", - "@louislam/ping": "~0.4.2-mod.0", + "@louislam/ping": "~0.4.2-mod.1", "@louislam/sqlite3": "15.1.2", "args-parser": "~1.3.0", "axios": "~0.27.0", From 2b57b3e863954c9d9cf7911b76f600bb8de4c41b Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 19 Jan 2023 02:17:17 +0800 Subject: [PATCH 3/4] Update to 1.19.6 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d9646efc..55c8c436 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uptime-kuma", - "version": "1.19.5", + "version": "1.19.6", "license": "MIT", "repository": { "type": "git", @@ -39,7 +39,7 @@ "build-docker-nightly-amd64": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain", "build-docker-pr-test": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:pr-test --target pr-test . --push", "upload-artifacts": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg VERSION --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain", - "setup": "git checkout 1.19.5 && npm ci --production && npm run download-dist", + "setup": "git checkout 1.19.6 && npm ci --production && npm run download-dist", "download-dist": "node extra/download-dist.js", "mark-as-nightly": "node extra/mark-as-nightly.js", "reset-password": "node extra/reset-password.js", From fa23e7ad19e68e3e68df0832750132d77fd29cc4 Mon Sep 17 00:00:00 2001 From: alejandrohernandezrosales Date: Fri, 20 Jan 2023 23:59:11 -0600 Subject: [PATCH 4/4] Removed superflous Message prefix --- server/notification-providers/pushover.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/notification-providers/pushover.js b/server/notification-providers/pushover.js index bafde56e..e4f0ddb8 100644 --- a/server/notification-providers/pushover.js +++ b/server/notification-providers/pushover.js @@ -10,7 +10,7 @@ class Pushover extends NotificationProvider { let pushoverlink = "https://api.pushover.net/1/messages.json"; let data = { - "message": "Message:" + msg, + "message": msg, "user": notification.pushoveruserkey, "token": notification.pushoverapptoken, "sound": notification.pushoversounds,