From 94be48dbd79d7e7f4737d12eafb75f008876e615 Mon Sep 17 00:00:00 2001 From: MarcUs7i <96580944+MarcUs7i@users.noreply.github.com> Date: Tue, 11 Mar 2025 18:16:20 +0100 Subject: [PATCH] Updated README.md --- README.md | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 79bb693..759b062 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,17 @@ # aPulse -A one-file NodeJS server status monitoring/notification tool. +A one-file NodeJS server status monitoring/notification tool.
+Changed by [MarcUs7i](https://github.com/MarcUs7i)
+Original repo without customizations: https://github.com/ybouane/aPulse # Demo Visit https://apulse.ybouane.com for a demo! +
Or visit the customized live version on: https://status.marcus7i.net [aPulse — Server Status Open Source NodeJS Tool](https://apulse.ybouane.com) # Features +- Changed it to update automatically on 00:00 (12:00 AM) +- Onion site checks with local IPs (public IPs will also work, but not recommended) - Highly and easily configurable, edit the config.js file to add test endpoints and configure the watcher - Supports sending outage notifications by: Telegram, Discord, Slack, SMS (Twilio API), Email (SendGrid API) - Uses the Fetch API to test server-responses, you can configure GET, POST, PUT... requests and have full control over the fetch options. @@ -54,6 +59,15 @@ export default { mustNotFind : /Page not found/i, // optional, String | Array | Regex | Function | AsyncFunction customCheck : async (content, response)=>{return true;}, // optional, Function | AsyncFunction -> Run your own custom checks return false in case of errors validStatus : [200], // optional, Which http status should be considered non errors [defaults to 200-299] + }, + { + id : 'onion-service', // optional + name : 'Onion Service', // optional + link : 'exampleonionaddress.onion:8333', // optional, displayed in dashboard and notifications + url : 'exampleonionaddress.onion:8333', // required, used for connection check + onionIP : '192.168.0.105', // optional, local IP to use for onion service check + customCheck : async (content, response)=>{return true;}, // optional + validStatus : ['SOCKET'], // required for onion services, specifies this is a socket connection check } ] } @@ -61,12 +75,22 @@ export default { }; ``` +## Onion Service Monitoring +For checking the status of Tor onion services, we use a local IP approach. This is way more secure and prevents exposing your onion services to unnecessary public checks: + +1. Set the `url` field to your onion address with port (e.g. `exampleonionaddress.onion:8333`) +2. Add an `onionIP` parameter with the local IP where the service is running (you can use public IPs aswell, but it's not recommended) +3. Set `validStatus` to `['SOCKET']` to indicate this is a socket connection check +4. The checker will try to connect to the specified IP:port to verify the service is running + # Installation Clone the repo: ```shell -git clone https://github.com/ybouane/aPulse.git +git clone https://github.com/MarcUs7i/statusPage.git ``` +Change the config file, since I am sure, you don't want to get the status of my services :) + Either run the watcher.js script directly (you need to keep it running in the background) ```shell cd aPulse @@ -75,23 +99,6 @@ cd aPulse node watcher.js ``` -Or use a tool like PM2 (prefered method): -```shell -npm install pm2 -g -``` -Start watcher.json -```shell -pm2 start pm2.json -``` -Configure pm2 to automatically start during startup -```shell -pm2 startup -``` -Save current pm2 processes list -```shell -pm2 save -``` - ### Serving the status page The `watcher.js` script only takes care of running the status checks and updates the `status.json` file in the `static/` folder. If you want to view the final result, you simply need to serve the files in the `static/` folder. You can use Nginx with a config like: ```nginx @@ -112,3 +119,5 @@ Or use any other tool to serve those files like the npm http-server package: cd static npx http-server -o ./ ``` + +Original repository from: https://github.com/ybouane/aPulse.git \ No newline at end of file