{"id":19182669,"url":"https://github.com/ybouane/aPulse","last_synced_at":"2025-04-20T04:32:12.716Z","repository":{"id":259161007,"uuid":"869750212","full_name":"ybouane/aPulse","owner":"ybouane","description":"A One-File Nodejs Server Status Monitoring Tool.","archived":false,"fork":false,"pushed_at":"2024-11-14T16:23:06.000Z","size":178,"stargazers_count":39,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T16:12:05.317Z","etag":null,"topics":["latency","monitor","monitoring","network-monitoring","nodejs","server","server-admin","server-administration","server-status","server-status-checker","status","tool","webdev"],"latest_commit_sha":null,"homepage":"https://apulse.ybouane.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ybouane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-08T20:25:28.000Z","updated_at":"2025-03-27T12:21:20.000Z","dependencies_parsed_at":"2024-10-23T06:04:22.295Z","dependency_job_id":"0f5c99f5-7021-4bf3-8e6c-cf50eca90bc1","html_url":"https://github.com/ybouane/aPulse","commit_stats":null,"previous_names":["ybouane/apulse"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FaPulse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FaPulse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FaPulse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybouane%2FaPulse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ybouane","download_url":"https://codeload.github.com/ybouane/aPulse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249850093,"owners_count":21334423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["latency","monitor","monitoring","network-monitoring","nodejs","server","server-admin","server-administration","server-status","server-status-checker","status","tool","webdev"],"created_at":"2024-11-09T11:00:37.891Z","updated_at":"2025-04-20T04:32:12.698Z","avatar_url":"https://github.com/ybouane.png","language":"JavaScript","readme":"# aPulse\nA one-file NodeJS server status monitoring/notification tool.\n\n# Demo\nVisit https://apulse.ybouane.com for a demo!\n\n[\u003cimg src=\"screenshot.png\" alt=\"aPulse — Server Status Open Source NodeJS Tool\" /\u003e](https://apulse.ybouane.com)\n\n# Features\n- Highly and easily configurable, edit the config.js file to add test endpoints and configure the watcher\n- Supports sending outage notifications by: Telegram, Discord, Slack, SMS (Twilio API), Email (SendGrid API)\n- Uses the Fetch API to test server-responses, you can configure GET, POST, PUT... requests and have full control over the fetch options.\n- Check content for validity, HTTP status...\n- Measures latency\n- Minimal and easy to use dashboard\n- Easy to setup. Run the watcher.js script and open the static/index.html page to view the dashboard.\n- Auto-reload of the config file (no need to restart the watcher)\n- No dependencies\n\n\n# How does it work\naPulse can be configured through the \"config.js\" file and it looks like this\n```javascript\nexport default {\n\tinterval\t\t\t: 15, // Interval in minutes between each pulse\n\tnDataPoints\t\t\t: 90, // Number of datapoints to display on the dashboard\n\tresponseTimeGood\t: 300, // In milliseconds, this and below will be green\n\tresponseTimeWarning\t: 600, // In milliseconds, above this will be red\n\ttimeout\t\t\t\t: 5000, // In milliseconds, requests will be aborted above this\n\tverbose\t\t\t\t: true, // Whether or not to output pulse messages in the console\n\treadableStatusJson\t: true, // Format status.json to be human readable\n\tlogsMaxDatapoints\t: 200, // Maximum datapoints history to keep (per endpoint)\n\ttelegram\t\t\t: {}, // optional, tokens to send notifications through telegram\n\tslack\t\t\t\t: {}, // optional, tokens to send notifications through slack\n\tdiscord\t\t\t\t: {}, // optional, tokens to send notifications through discord\n\ttwilio\t\t\t\t: {}, // optional, tokens to send notifications through twilio (SMS)\n\tsendgrid\t\t\t: {}, // optional, tokens to send notifications through sendgrid (Email)\n\tconsecutiveErrorsNotify\t\t\t: 1, // After how many consecutive Errors events should we send a notification\n\tconsecutiveHighLatencyNotify\t: 3, // After how many consecutive High latency events should we send a notification\n\tsites\t\t\t\t: [ // List of sites to monitor\n\t\t{\n\t\t\tid\t\t\t\t: 'google', // optional\n\t\t\tname\t\t\t: 'Google',\n\t\t\tendpoints\t\t: [ // Each site is a bunch of endpoints that can be tested\n\t\t\t\t{\n\t\t\t\t\tid\t\t\t\t: 'homepage', // optional\n\t\t\t\t\tname\t\t\t: 'Homepage', // optional\n\t\t\t\t\tlink\t\t\t: 'https://www.google.com', // optional, for notifications and dashboard only, [defaults to endpoint.url], can be disabled by setting it to false\n\t\t\t\t\turl\t\t\t\t: 'https://www.google.com', // required\n\t\t\t\t\trequest\t\t\t: { // optional, fetch options\n\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t},\n\t\t\t\t\tmustFind\t\t: 'Feeling Lucky', // optional, String | Array | Regex | Function | AsyncFunction\n\t\t\t\t\tmustNotFind\t\t: /Page not found/i, // optional, String | Array | Regex | Function | AsyncFunction\n\t\t\t\t\tcustomCheck\t\t: async (content, response)=\u003e{return true;}, // optional, Function | AsyncFunction -\u003e Run your own custom checks return false in case of errors\n\t\t\t\t\tvalidStatus\t\t: [200], // optional, Which http status should be considered non errors [defaults to 200-299]\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n};\n```\n\n# Installation\nClone the repo:\n```shell\ngit clone https://github.com/ybouane/aPulse.git\n```\n\nEither run the watcher.js script directly (you need to keep it running in the background)\n```shell\ncd aPulse\n```\n```shell\nnode watcher.js\n```\n\nOr use a tool like PM2 (prefered method):\n```shell\nnpm install pm2 -g\n```\nStart watcher.json\n```shell\npm2 start pm2.json\n```\nConfigure pm2 to automatically start during startup\n```shell\npm2 startup\n```\nSave current pm2 processes list\n```shell\npm2 save\n```\n\n### Serving the status page\nThe `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:\n```nginx\n# Pulse\nserver {\n\troot /var/www/apulse/static/;\n\tindex index.html;\n\tserver_name apulse.ybouane.com;\n\tlocation /favicon.ico {\n\t\treturn 301 \"/favicon.png\";\n\t}\n\tlisten 80;\n}\n```\n\nOr use any other tool to serve those files like the npm http-server package:\n```shell\ncd static\nnpx http-server -o ./\n```\n","funding_links":[],"categories":["Opensource","JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybouane%2FaPulse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fybouane%2FaPulse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybouane%2FaPulse/lists"}