{"id":13821676,"url":"https://github.com/jgmdev/watchsys","last_synced_at":"2025-05-15T11:31:46.465Z","repository":{"id":25736751,"uuid":"29174185","full_name":"jgmdev/watchsys","owner":"jgmdev","description":"Bash shell script for basic system monitoring and prevention.","archived":false,"fork":false,"pushed_at":"2015-11-28T02:22:38.000Z","size":34,"stargazers_count":28,"open_issues_count":0,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-03T08:04:49.810Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jgmdev.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-13T05:22:38.000Z","updated_at":"2025-03-03T14:49:49.000Z","dependencies_parsed_at":"2022-08-06T07:01:17.222Z","dependency_job_id":null,"html_url":"https://github.com/jgmdev/watchsys","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgmdev%2Fwatchsys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgmdev%2Fwatchsys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgmdev%2Fwatchsys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jgmdev%2Fwatchsys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jgmdev","download_url":"https://codeload.github.com/jgmdev/watchsys/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254330720,"owners_count":22053034,"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":[],"created_at":"2024-08-04T08:01:25.769Z","updated_at":"2025-05-15T11:31:45.975Z","avatar_url":"https://github.com/jgmdev.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# WatchSys\n\nBash shell script for basic system monitoring and prevention.\n\n## About\n\nWatchSys is a set of bash shell scripts that run from a central daemon\nfor basic monitoring of a linux server processes, cpu usage,\nnetwork connections, ram usage, disk usage, file changes, etc...\n\nThis software is licensed under the GPLv3 http://www.gnu.org/licenses/\n\n### Features\n\n* Monitoring of file changes.\n* Monitoring of servers online status.\n* Monitoring of cpu, memory and disk usage.\n* Monitoring of system processes/services status.\n* Automatic restart of system processes/services if they fail.\n* E-mailing of reports for system events like failed proccesses,\n  dead connections, file changes, critical cpu usage,\n  critical memory usage, critical disk space usage, etc...\n\n## Installation\n\nAs root user execute the following commands:\n\n```shell\nwget https://github.com/jgmdev/watchsys/archive/master.zip\nunzip master.zip\ncd watchsys-master\n./install.sh\n```\n\n## Uninstallation\n\nAs root user execute the following commands:\n\n```shell\ncd watchsys-master\n./uninstall.sh\n```\n\n## Usage\n\nThe installer will automatically detect if your system supports\ninit.d scripts, systemd services or cron jobs. If one of them is found\nit will install apropiate files and start the watchsys script.\n\nOnce you hava WatchSys installed proceed to modify the config\nfiles to fit your needs.\n\n**/etc/watchsys/watchsys.conf**\n\nThe behaviour of the watchsys script is modified by this configuration file.\nFor more details see **man watchsys** which has documentation of the\ndifferent configuration options.\n\n**/etc/watchsys/proc.list**\n\nOn this file you can add a list of processes you wish to monitor\nin case of failure, this processes would be restarted by WatchSys\nand a notification e-mail sent to you. Example:\n\n\u003e \\# [Process Name] : [Service Name] : [Start Command] \u003cbr /\u003e\n\u003e   named          :   bind9        :  default \u003cbr /\u003e\n\u003e   hiawatha       :   hiawatha     :  hiawatha -c /custom/config.conf\n\n**/etc/watchsys/servers.list**\n\nOn this file you can add a list of host names or ip addresses to\nmonitor its online status, for example:\n\n\u003e \\# server : port \u003cbr /\u003e\n\u003e myserver.com : none \u003cbr /\u003e\n\u003e myserver.com : 80 \u003cbr /\u003e\n\u003e mail.myserver.com : 143 \u003cbr /\u003e\n\u003e 192.168.1.1 : none\n\nAs you see **none** is used when we want to monitor a server online\nstatus, but not a service on a specific port.\n\n**/etc/watchsys/dir.list**\n\nHere you can add a list of directories to scan for file changes.\nif any changes are found on the given directories, an e-mail\nwill be sent to you with a report. Example:\n\n\u003e /usr/bin \u003cbr /\u003e\n\u003e /usr/sbin\n\nAfter you modify the config files you will need to restart the daemon.\nIf running on systemd:\n\n\u003e systemctl restart watchsys\n\nIf running as classical init.d script:\n\n\u003e /etc/init.d/watchsys restart \u003cbr /\u003e\n\u003e or \u003cbr /\u003e\n\u003e service watchsys restart\n\n## CLI Usage\n\n**watchsys** [OPTION]\n\n#### OPTIONS\n\n**-h | --help:**\n\n   Show the help screen.\n\n**-d | --start:**\n\n   Initialize a daemon to monitor system.\n\n**-s | --stop:**\n\n   Stop the daemon.\n\n**-t | --status:**\n\n   Show status of daemon and pid if currently running.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgmdev%2Fwatchsys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjgmdev%2Fwatchsys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjgmdev%2Fwatchsys/lists"}