A CLI tool for monitoring VPS information using SolusVM API
Project description
VPSinfo
A command-line tool for monitoring VPS information using the SolusVM API. Supports concurrent monitoring of multiple VPS instances with bandwidth usage and system status information.
Features
- Monitor bandwidth usage (used, total, percentage)
- Monitor memory usage (used, total, percentage)
- Monitor disk usage (used, total, percentage)
- Concurrent monitoring of multiple VPS instances
- Human-readable data formatting
- Simple JSON configuration
- Verbose mode for debugging
Installation
pip install vpsinfo
Configuration
Create a configuration file at ~/.vpsinfo.json:
[
{
"name": "my-vps-1",
"url": "https://your-solusvm-url:5656",
"key": "your-api-key",
"hash": "your-api-hash"
}
]
Each VPS entry requires:
name: A friendly name for the VPSurl: SolusVM API URL (usually ends with :5656)key: API key from SolusVM control panelhash: API hash from SolusVM control panel
Usage
Monitor all VPS metrics (bandwidth, memory, disk):
vpsinfo
Enable verbose output for debugging:
vpsinfo -v
or
vpsinfo --verbose
Example Output
╒══════════════╤══════════╤══════════╤═══════════╤═══════╤══════════╤═══════════╤═══════╤══════════╤═══════════╤═══════╕
│ VPS Name │ Status │ BW Used │ BW Total │ BW % │ Mem Used │ Mem Total │ Mem % │ Disk Used│ Disk Total│ Disk %│
╞══════════════╪══════════╪══════════╪═══════════╪═══════╪══════════╪═══════════╪═══════╪══════════╪═══════════╪═══════╡
│ my-vps-1 │ Success │ 1.25 GiB │ 500.0 GiB │ 0.3% │ 512.0MiB │ 1.0 GiB │ 50.0% │ 10.0 GiB │ 50.0 GiB │ 20.0%│
╘══════════════╧══════════╧══════════╧═══════════╧═══════╧══════════╧═══════════╧═══════╧══════════╧═══════════╧═══════╛
When an error occurs:
╒══════════════╤═════════════════════════╤══════════╤═══════════╤═══════╤══════════╤═══════════╤═══════╤══════════╤═══════════╤═══════╕
│ VPS Name │ Status │ BW Used │ BW Total │ BW % │ Mem Used │ Mem Total │ Mem % │ Disk Used│ Disk Total│ Disk %│
╞══════════════╪═════════════════════════╪══════════╪═══════════╪═══════╪══════════╪═══════════╪═══════╪══════════╪═══════════╪═══════╡
│ my-vps-1 │ Error - Connection failed│ N/A │ N/A │ N/A │ N/A │ N/A │ N/A │ N/A │ N/A │ N/A │
╘══════════════╧═════════════════════════╧══════════╧═══════════╧═══════╧══════════╧═══════════╧═══════╧══════════╧═══════════╧═══════╛
Error Handling
- If a VPS is unreachable or there are API errors, the status will show as "Error" with an error message
- All metrics will show as "N/A" when an error occurs
- Configuration file errors will be reported with clear error messages
- All errors are displayed in red for better visibility
- Use verbose mode (-v) to see detailed debug information
Requirements
- Python 3.7 or higher
- click
- tabulate
- requests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vpsinfo-0.1.0.tar.gz.
File metadata
- Download URL: vpsinfo-0.1.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aefae82ced22585d91663bb171eb08c0974e3ded27abdd081ce09a6489335cbd
|
|
| MD5 |
faa90ec8fc69c6ec0d7b094a8a9d5eae
|
|
| BLAKE2b-256 |
bbde814544871f93a79904075accc9dfef50a4b4fb0b934758236447b9fd726d
|
File details
Details for the file vpsinfo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vpsinfo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f973f8b99ae337b9c9c407cc8910cc930f89beb18a9dca309492622574ae24a
|
|
| MD5 |
032157596fafe55b158a061d04619def
|
|
| BLAKE2b-256 |
171fd742e98e9c7a0f2cbcf18d95f3da6281220db0a4576da937e8098cdb7b15
|