This script is deprecated.
Machine Stats for Hypervisors (Virt-Stats)
A simple and effective way to gather guest VM statistics (hostname, IP addresses) from a libvirt-based environment as a first layer of a Tidal's discovery process. A common use case is to use this to integrate your KVM-based virtual machine inventory into the Tidal Accelerator Platform.
Prerequisutes
- Python 3+
- libvirt >=3.0.0 installed on both operator machine (i.e where you run Virt-Stats) and on remote machine (i.e where you run your virtual environmnent and guest VMs)
Installation
Install locally in a Python 3 environment:
python3 -m pip install virt-stats
Data captured
As of now Virt-Stats captures the following metrics:
- Hostname
- IP Addresses
- CPU count
- RAM allocated (GB)
- RAM used (GB)
Usage
virt-stats --connection URI
Please refer to the Connection URIs documentation for additional information.
Output
Virt-Stats outputs a JSON document suitable to be piped to Tidal Tools:
virt-stats --connection qemu+ssh://me@10.0.0.1/system | tidal sync servers
Troubleshooting
virt-stats: command not found
If running Virt-Stats as a CLI failed, try running it as the following:
python3 -m virt-stats
Contributing
If you're interested in contributing to Virt-Stats, please check our contributing guide.
Metadata
Release files for virt-stats 3.0.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 | |
|---|---|---|---|
| virt_stats-3.0.0.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| virt_stats-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 kB
Release files / virt_stats-3.0.0.tar.gz
| Download URL | virt_stats-3.0.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49bb2b76ab69a6a8f943d4f11c6f7e108378721e2e0ad19f00268ca3eae15eb6
|
|
BLAKE2b-256 checksum How to use checksums |
39d3fe26a4d1898f8dfe4454b3d908b25c1b6ba0282905c055ab394e40bf5eb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.18
|
Release files / virt_stats-3.0.0-py3-none-any.whl
| Download URL | virt_stats-3.0.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
258e25da7c69032fde4109be696c95f940c6e0e6e31935bac1e77dfbd176a62d
|
|
BLAKE2b-256 checksum How to use checksums |
a348a889926c903f97e987b3d13673ca6dc0237771a1f801c5e16549aef483ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.18
|