Connect to any Linux VPS with your root credentials and get an instant, full-colour report on what's going wrong. vitals-vps acts as an automated system administrator, identifying CPU spikes, active brute-force attacks, memory pressure, disk exhaustion, and zombie processesโand gives you the exact commands to fix them.
โ 100% Safe & Read-Only: Every command is strictly filtered through a safety blocklist. No files are created, modified, or deleted. No services are restarted.
๐ Installation
Install globally via pip:
pip install vitals-vps
(Requires Python 3.8+, paramiko, and rich)
๐ป Usage
You can use vitals-vps straight from your terminal or programmatically via Python.
Terminal CLI
# Prompt for password (recommended)
vitals 192.168.1.10 --ask-pass
# Use an SSH key instead of a password
vitals 192.168.1.10 --key ~/.ssh/id_rsa
# Non-standard port or user
vitals 192.168.1.10 --port 2222 --user ubuntu --ask-pass
# Verbose mode: Also show raw process lists, log excerpts, and port tables
vitals 192.168.1.10 --ask-pass --verbose
# JSON output: pipe structured findings into CI/alerting pipelines
vitals 192.168.1.10 --ask-pass --output json
Python API (Jupyter / Scripts / Google Colab)
Perfect for integrating into automated monitoring dashboards or running from Jupyter Notebooks.
import vitals
# Print the full styled report to your screen
vitals.info("192.168.1.10", password="mypassword")
# Use key-based authentication
vitals.info("192.168.1.10", user="ubuntu", key="~/.ssh/id_rsa")
# Silent execution: Returns a list of Finding objects for automation
findings = vitals.scan("192.168.1.10", password="mypassword")
critical_issues = [f for f in findings if f.severity.value == "critical"]
for issue in critical_issues:
print(f"Alert: {issue.title}")
๐ What It Checks
| Category | Diagnostic Targets |
|---|---|
| โก CPU | Load average vs core count, CPU utilization %, I/O wait (iowait), runaway background processes. |
| ๐ง Memory | RAM allocation, available memory, swap usage, and recent OOM (Out-of-Memory) killer events. |
| ๐ฝ Disk | Partitions > 80% full, inode exhaustion, largest hidden directories, disk I/O bottlenecks. |
| ๐ Network | Connection floods, top remote IPs, TIME_WAIT socket buildup, and open listening ports. |
| ๐ก๏ธ Security | SSH brute-force attacks, top attacking IPs, fail2ban status, firewall presence, active sessions, and unauthorized UID-0 accounts. |
| โ๏ธ Processes | Zombie processes, D-state (I/O-blocked) processes, and failed systemd services. |
| ๐ Logs | dmesg kernel errors, systemd journal errors, and web server / database error logs. |
๐ Sample Output
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ System Identity โ
โ Host my-server.example.com โ
โ OS Ubuntu 22.04.3 LTS โ
โ Kernel 5.15.0-89-generic โ
โ Uptime up 12 days, 4 hours โ
โ CPU Intel Xeon E5-2670 v2 โ
โ Cores 4 โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Diagnostic Scorecard โ
โ Category Status Findings โ
โ CPU โ CRITICAL 1 issue(s) โ
โ Memory โ CRITICAL 2 issue(s) โ
โ Disk โ
OK All clear โ
โ Network โ WARNING 1 issue(s) โ
โ Security โ CRITICAL 2 issue(s) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโ CPU โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ด Extreme load average: 8.4 on 4 core(s)
๐ 1-min load=8.4, 5-min=6.2, 15-min=4.1. With 4 cores,
the system has ~2x more runnable work than it can handle.
๐ก What to do: Identify the runaway process(es)โฆ
๐ Commands:
ps aux --sort=-%cpu | head -15
top -b -n1 | head -20
โโ Security โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ด Active brute-force attack: 47,312 SSH login failures
๐ 47,312 failed SSH login attempts found in auth log.
๐ก What to do:
1. Install fail2ban immediately to auto-ban attackers.
2. Change SSH to a non-standard port (e.g. 2222).
3. Disable password login โ use SSH keys only.
๐ Commands:
apt install fail2ban -y
systemctl enable --now fail2ban
๐ Safety Guarantees
- Hardware Level Guard: Every SSH command runs through a rigorous blocklist filter. If a command string contains anything resembling a write, delete, kill, or install operation, it immediately raises a
ValueErrorbefore sending it to your server. - No Artifacts Left Behind: No temporary data is written to disk. The tool runs entirely in memory, prints the results, and cleanly closes the SSH connection.
- Secure Key Management: The SSH client leverages
AutoAddPolicyfor seamless connections, but strictly logs host keys to prevent man-in-the-middle attacks.
๐บ๏ธ Roadmap
-
--output jsonflag for piping directly into CI/CD or alerting pipelines -
--watchmode: re-scan every N seconds for live monitoring - HTML report export for client delivery
- Docker container support (scan via
docker exec) - Baseline comparison mode: diff current findings against a historical baseline
โ๏ธ License
This project is licensed under the MIT License.
You are free to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software in both private and commercial environments, provided that the original copyright notice and permission notice are included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Metadata
Release files for vitals-vps 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| vitals_vps-0.3.0.tar.gz | 42.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vitals_vps-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 80.8 kB
Release files / vitals_vps-0.3.0.tar.gz
| Download URL | vitals_vps-0.3.0.tar.gz |
|---|---|
| Size | 42.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80582caf7118c6f65597d92e53c4063c34e55129ea1960fd978be1b51e785672
|
|
BLAKE2b-256 checksum How to use checksums |
e3008bda7950dfe356285bf2662440ed76c6089580742bd0cdde15bcc2b85592
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / vitals_vps-0.3.0-py3-none-any.whl
| Download URL | vitals_vps-0.3.0-py3-none-any.whl |
|---|---|
| Size | 38.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cba77f073a93f5b43074a75a4597db9edbe4c6adce615c397286f3dc0ff075c9
|
|
BLAKE2b-256 checksum How to use checksums |
a9cdbffd83c18f7cec885699f51cab4d1198e1dfc35d4dad9939e1f619a840a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|