Skip to main content

A CLI tool for monitoring VPS information using SolusVM and Virtualizor APIs

Project description

VPSinfo

A command-line tool for monitoring VPS information using SolusVM and Virtualizor APIs. 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-solusvm-vps",
        "type": "solusvm",
        "url": "https://your-solusvm-url:5656",
        "key": "your-api-key",
        "hash": "your-api-hash"
    },
    {
        "name": "my-virtualizor-vps",
        "type": "virtualizor",
        "url": "https://your-virtualizor-url:4083",
        "key": "your-api-key",
        "hash": "your-api-password-hash"
    },
    {
        "name": "vps-with-self-signed-cert",
        "type": "solusvm",
        "url": "https://manage.example.com",
        "key": "your-api-key",
        "hash": "your-api-hash",
        "verify_ssl": false
    }
]

Each VPS entry requires:

  • name: A friendly name for the VPS
  • type: VPS panel type ("solusvm" or "virtualizor")
  • url: API URL
    • For SolusVM: usually ends with :5656
    • For Virtualizor: usually ends with :4083
  • key: API key from control panel
  • hash:
    • For SolusVM: API hash from control panel
    • For Virtualizor: API password hash from control panel
  • verify_ssl: (Optional) Whether to verify SSL certificates (default: true)
    • Set to false to disable SSL verification for servers with self-signed or invalid certificates
    • Warning: Disabling SSL verification reduces security

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vpsinfo-0.2.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vpsinfo-0.2.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file vpsinfo-0.2.0.tar.gz.

File metadata

  • Download URL: vpsinfo-0.2.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for vpsinfo-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0e8871f8d7c75112dd886d469e17a9ad29de57cad21dd874ed506a444eb12c61
MD5 346db44f0db8e99f49419970e57aa33c
BLAKE2b-256 a6b0793cd70c38411b8914ad6674aedf4e9efe788be46924e0c0dee971fa50ff

See more details on using hashes here.

File details

Details for the file vpsinfo-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: vpsinfo-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for vpsinfo-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f73282622c0d6d210f10505ff3306e37e7e565d65941b07546b050b9e6faa085
MD5 91b7c9fe7421b85e7e685cea7aac2e23
BLAKE2b-256 683e2d0c013b4aaf0651d6c1b2f44588ae1852807d69064d08fc6045bf3b46f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page