Skip to main content

๐Ÿฉบ vitals-vps

Read-only SSH server diagnostics with plain-English root-cause analysis.

Tests PyPI Version Python Support License: MIT


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 ValueError before 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 AutoAddPolicy for seamless connections, but strictly logs host keys to prevent man-in-the-middle attacks.

๐Ÿ—บ๏ธ Roadmap

  • --output json flag for piping directly into CI/CD or alerting pipelines
  • --watch mode: 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)

Source distribution for vitals-vps 0.3.0
File Size Uploaded
vitals_vps-0.3.0.tar.gz 42.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vitals-vps 0.3.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page