{"id":25255079,"url":"https://github.com/blu3mania/disk-space-monitor","last_synced_at":"2025-04-05T23:42:55.278Z","repository":{"id":41143294,"uuid":"343616613","full_name":"blu3mania/disk-space-monitor","owner":"blu3mania","description":"Monitor disk space usage and notify user by email or system notification.","archived":false,"fork":false,"pushed_at":"2023-12-18T16:28:58.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-28T21:50:08.871Z","etag":null,"topics":["disk-monitor","disk-space","monitoring","monitoring-tool","notification","system-service","windows-service"],"latest_commit_sha":null,"homepage":"","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/blu3mania.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}},"created_at":"2021-03-02T02:06:54.000Z","updated_at":"2022-11-16T16:01:56.000Z","dependencies_parsed_at":"2023-01-23T15:05:18.199Z","dependency_job_id":"4a1febe0-ee17-4a54-b941-7f2a68b754ea","html_url":"https://github.com/blu3mania/disk-space-monitor","commit_stats":{"total_commits":16,"total_committers":3,"mean_commits":5.333333333333333,"dds":0.25,"last_synced_commit":"66da19410280984a527300a5c166435f35779377"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blu3mania%2Fdisk-space-monitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blu3mania%2Fdisk-space-monitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blu3mania%2Fdisk-space-monitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blu3mania%2Fdisk-space-monitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blu3mania","download_url":"https://codeload.github.com/blu3mania/disk-space-monitor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415925,"owners_count":20935385,"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":["disk-monitor","disk-space","monitoring","monitoring-tool","notification","system-service","windows-service"],"created_at":"2025-02-12T05:51:58.721Z","updated_at":"2025-04-05T23:42:55.253Z","avatar_url":"https://github.com/blu3mania.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# disk-space-monitor\n[![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-yellow)](https://raw.githubusercontent.com/blu3mania/disk-space-monitor/main/LICENSE)\n[![node.js 18+](https://img.shields.io/badge/node.js-18.0.0-blue?logo=node.js)](https://nodejs.org/en/)\n[![Latest Release](https://img.shields.io/github/v/release/blu3mania/disk-space-monitor)](https://github.com/blu3mania/disk-space-monitor/releases/latest)\n\nMonitor disk space usage and notify user by email or system notification.\n\nIt can be run as a standalone application or as a system service.\n\n**Note**, this package is written as ES Module starting with 2.0. For CommonJS version, use version 1.x from\nCommonJS branch.\n\n## Run these steps first:\n\n1. One of the packages, \"diskusage\", uses native modules and relies on \"node-gyp\" to build the project. As a\n   result, there are some prerequisites that need to be installed/configured. Please refer to [node-gyp's\n   instructions](https://github.com/nodejs/node-gyp#installation).\n\n2. Edit src/settings.json.\n   * service defines service parameters when installed as a system service:\n     * name is the service name to be used.\n     * account info is optional. If provided, the service will be running as the specified account. These properties\n       can be provided:\n       * name is account's name, when running on Windows\n       * password is account's password, when running on Windows\n       * domain is optional, and should be provided if the account is a domain account when running on Windows\n       * user is the user name, when running on Linux\n       * group is the group name, when running on Linux\n   ```\n    \"service\": {\n        \"name\": \"Disk Space Monitor\",\n        \"account\": {\n            \"name\": \"{account name}\",\n            \"password\": \"{account password}\",\n            \"domain\": \"{account domain}\"\n        }\n    },\n   ```\n   * disks lists all the disks this script needs to montior.\n     * path is the path to the disk. On Windows it's usaully the drive letter followed by a colon, e.g. \"C:\".\n       On Linux it is usually the mounted file system path, e.g. \"/dev\".\n     * threshold is the amount of free space to trigger the notificaiton.\n\n       It can be a percentage of total disk space, e.g. \"5%\", or in bytes, e.g. \"4096\" or \"1024B\".\n       Multiple-byte units are supported, with the unit defined with either SI prefixes or binary prefixes.\n       * Supported units with SI prefix: kB, MB, GB, TB. PB. For example, \"500MB\".\n       * Supported units with binary prefix: KiB, MiB, GiB, TiB. PiB. These units can also be shortened\n         without \"iB\", e.g. \"30G\".\n   * checkInterval is the interval (in seconds) you want the script to check disk usage.\n   * notificationTypes is an array of string values that defines what types of notification should be sent.\n\n     Supported values are: \"email\", \"desktop\".\n     * Email notifications are sent with options described below.\n     * Desktop notifications are shown to the user on desktop. For example, on Windows 10 it uses Windows\n       Toast notification.\n\n       **Note**, this only works when running in standalone mode instead of as a system service.\n   * email defines options for email notifications.\n     * format is the email format. It can be either \"html\" or \"text\". \"html\" is the default value.\n     * subject is the email subject. You can use these macros in the defined value:\n       * {HOST} - the host machine name\n       * {DISK} - the path to the disk being reported (as defined in disks)\n       * {THRESHOLD} - the threshold defined for the disk being reported (as defined in disks, but normalized,\n         e.g. \"4096\" =\u003e \"4096 bytes\", \"500k\" =\u003e \"500KiB\")\n       * {THRESHOLDBYTES} - exact # of bytes for defined threshold, which is useful when defined in percentage\n       * {TOTAL} - total disk space in bytes\n       * {FREE} - remaining free disk space in bytes\n       * {AVAILABLE} - available disk space that current user can use, in bytes\n     * body is the email body. If using HTML format, it can contain HTML tags. It also supports the same set\n       of macros as subject does.\n     * from is the from user name/email. Format is \"name \u003cemail\u003e\", or simply an email address.\n     * to, cc, bcc are the email recipient. Multiple email addresses can be used with comma as delimiter.\n     * smtp defines the SMTP server options used by nodemailer. Please refer to [nodemail's SMTP Transport\n       page](https://nodemailer.com/smtp/) for details.\n3. Run \"npm install\". If running on Windows, accept UAC prompts if any (there could be up to 4).\n\n   **Note**, this step installs the script as a system service. If it's not desired, run \"npm run uninstall\" afterwards.\n\n## To run the script manually:\n\nRun \"npm start\" or \"node src/app.js\".\n\n## To install and run the script as a system service:\n\nRun \"npm run install\" or \"node src/install-service.js\". If running on Windows, accept UAC prompts if any (there could be up to 4).\n\n**Note**, if settings.json is updated when service is running, restart the server (on Windows, this can be done from Services control panel).\n\n## To uninstall the system service:\n\nRun \"npm run uninstall\" or \"node src/uninstall-service.js\". If running on Windows, accept UAC prompts if any (there could be up to 4).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblu3mania%2Fdisk-space-monitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblu3mania%2Fdisk-space-monitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblu3mania%2Fdisk-space-monitor/lists"}