{"id":51129881,"url":"https://github.com/ruhanirabin/servus","last_synced_at":"2026-06-25T11:01:29.172Z","repository":{"id":362947984,"uuid":"1261396837","full_name":"ruhanirabin/servus","owner":"ruhanirabin","description":"A self-installing server utility kit for Linux. Automates the recurring chores that eat sysadmin time — disk reports, log cleanup, service monitoring, resource alerts — all delivered to a webhook and managed through cron.","archived":false,"fork":false,"pushed_at":"2026-06-06T17:28:28.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-06T18:15:35.247Z","etag":null,"topics":["cron","linux","server","sysadmin-tool"],"latest_commit_sha":null,"homepage":"https://www.ruhanirabin.com/tools/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruhanirabin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-06T16:20:29.000Z","updated_at":"2026-06-06T17:28:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ruhanirabin/servus","commit_stats":null,"previous_names":["ruhanirabin/servus"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ruhanirabin/servus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruhanirabin%2Fservus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruhanirabin%2Fservus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruhanirabin%2Fservus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruhanirabin%2Fservus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruhanirabin","download_url":"https://codeload.github.com/ruhanirabin/servus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruhanirabin%2Fservus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34771664,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cron","linux","server","sysadmin-tool"],"created_at":"2026-06-25T11:01:21.920Z","updated_at":"2026-06-25T11:01:29.161Z","avatar_url":"https://github.com/ruhanirabin.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# servus\n\nA self-installing server utility kit for Linux. Automates the recurring chores that eat sysadmin time — disk reports, log cleanup, service monitoring, resource alerts — all delivered to a webhook and managed through cron. Each component have their own cron pipeline.\n\n## Install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/ruhanirabin/servus/main/install.sh | sudo bash\n```\n\n⚠️Requires: Linux with `systemd`, `curl`, and `cron`. Tested on Ubuntu, Debian, Rocky Linux, AlmaLinux.\n\n## What it does\n\n| Command | What it runs |\n|---|---|\n| `servus disk-report` | Sends disk usage, MySQL size, and log size to your webhook |\n| `servus log-vacuum` | Truncates log files older than N days, vacuums systemd journal |\n| `servus system-info` | Prints CPU, RAM, disk, and uptime to the terminal |\n| `servus cpu-ram-alert` | Alerts via webhook if CPU or RAM stays above threshold for N minutes |\n| `servus service-watchdog` | Alerts (and optionally restarts) services that go down |\n| `servus swap-alert` | Alerts if swap usage stays high — an early warning for memory pressure |\n| `servus tmp-cleanup` | Deletes old files from `/tmp` and `/var/tmp` |\n| `servus heartbeat` | Pings uptime monitoring endpoints (UptimeKuma push, BetterStack, generic HTTP) |\n\nAll alerts send a JSON payload to a webhook URL you configure once during setup.\n\n## Setup\n\nThe installer runs the setup wizard automatically. To re-run it later:\n\n```bash\nservus setup\n```\n\nThis asks for your webhook URL, alert thresholds, services to watch, and sets up cron schedules interactively. Config is saved to `/usr/local/etc/servus/config`.\n\nTo manage cron jobs independently:\n\n```bash\nservus cron\n```\n\n## Cron schedule options\n\nThe cron wizard offers: every 5 min, 15 min, 30 min, hourly, every 6h, every 12h, daily, weekly, or a custom expression. Each module's schedule is set independently.\n\n## Updating\n\n```bash\nservus update\n```\n\nChecks GitHub for a newer version. Minor and patch updates apply with a single confirmation. Major version upgrades show a warning and require explicit confirmation — check the [CHANGELOG.md](CHANGELOG.md) first.\n\n## Other commands\n\n```bash\nservus heartbeat add      # add a heartbeat endpoint (prompted)\nservus heartbeat list     # show configured endpoints\nservus heartbeat remove   # remove an endpoint\nservus status             # show current config and cron jobs, check for updates\nservus detect             # auto-detect installed services on this system\nservus uninstall          # remove everything cleanly\nservus help               # list all commands\n```\n\n## Installed paths\n\n| Path | Purpose |\n|---|---|\n| `/usr/local/bin/servus` | Main binary |\n| `/usr/local/lib/servus/` | Modules and libraries |\n| `/usr/local/etc/servus/config` | Configuration |\n| `/var/lib/servus/` | State files (alert tracking) |\n| `/var/log/servus/servus.log` | Internal log |\n\n## Webhook payload\n\nEvery module sends a JSON payload. Example from `disk-report` (v1.1.0+):\n\n```json\n{\n  \"host_name\": \"web01\",\n  \"host_ip\": \"192.168.1.10\",\n  \"timestamp\": \"2026-01-15 09:00:00\",\n  \"disk_device\": \"/dev/sda1\",\n  \"disk_used_gb\": 42.5,\n  \"disk_total_gb\": 100.0,\n  \"disk_avail_gb\": 57.5,\n  \"disk_use_pct\": 42,\n  \"mysql_space_mb\": 1024,\n  \"logs_space_mb\": 310,\n  \"cpu_count\": 4,\n  \"cpu_use_pct\": 15,\n  \"total_ram_gb\": 8.0,\n  \"mem_used_gb\": 3.2,\n  \"ram_use_pct\": 40\n}\n```\n\n## Recent Changes (v1.1.0)\n- **Automation Ready**: `disk-report` now includes explicit `cpu_use_pct` and `ram_use_pct` fields for direct threshold evaluation by external tools.\n- **Stability**: Fixed `df` parsing on systems with long device names (LVM/ZFS) and replaced fragile `uptime` parsing with `/proc/loadavg`.\n- **Safety**: `log-vacuum` now explicitly excludes `/var/log/servus/` to protect internal audit logs.\n- **Security**: `WEBHOOK_URL` is now masked in `servus status` output to prevent token leakage.\n- **Reliability**: Installer now explicitly checks for the `cron` package to prevent silent scheduling failures on minimal OS images.\n\nSee the full [CHANGELOG.md](CHANGELOG.md) for details.\n\n## Requirements\n\n- Linux (systemd required for `service-watchdog`)\n- `curl`\n- Root access for install and runtime\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\n---\n\nMade by [Ruhani Rabin](https://www.ruhanirabin.com/tools/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruhanirabin%2Fservus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruhanirabin%2Fservus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruhanirabin%2Fservus/lists"}