fastapi_cloud_healthcheck_azure_vm
A FastAPI-based health check module for monitoring the health of Azure Virtual Machines (VMs) using the fastapi_cloud_healthcheck package.
Features
- VM Power State Check: Verifies if the Azure VM is currently running.
- Disk Health Check: Checks the health status of attached disks to ensure they are provisioned successfully.
- Network Interface Check: Validates the health of network interfaces (NICs) associated with the Azure VM.
Adding Health Checks
Here is a sample FastAPI application that integrates the Azure VM health check:
from fastapi import FastAPI
from fastapi_cloud_healthcheck import HealthCheckFactory, create_health_check_route
from fastapi_cloud_healthcheck_azure_vm import HealthCheckAzureVM
app = FastAPI()
# Create Health Check Factory
health_check_factory = HealthCheckFactory()
# Add the Azure VM Health Check
health_check_factory.add(
HealthCheckAzureVM(
vm_name="my-azure-vm",
resource_group="my-resource-group",
subscription_id="my-subscription-id",
region="eastus"
)
)
# Add the health check route to FastAPI
app.add_api_route('/health', endpoint=create_health_check_route(factory=health_check_factory))
# Start the FastAPI server using Uvicorn
if __name__ == "__main__":
import uvicorn
uvicorn.run("main:app", port=5000)
Metadata
Release files for fastapi-cloud-healthcheck-azure-vm 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fastapi_cloud_healthcheck_azure_vm-1.0.1.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastapi_cloud_healthcheck_azure_vm-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / fastapi_cloud_healthcheck_azure_vm-1.0.1.tar.gz
| Download URL | fastapi_cloud_healthcheck_azure_vm-1.0.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eef6431f499ee8ce4ab0b07ff1c6fe80bfdf2ac7f801eae38a8be8b0678d3db5
|
|
BLAKE2b-256 checksum How to use checksums |
1d5e0b0c4c6d478e1b83691a81fc0739af7e514dd23f4e053e6b6e56bbea744e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.9.20 Linux/6.8.0-1014-azure
|
Release files / fastapi_cloud_healthcheck_azure_vm-1.0.1-py3-none-any.whl
| Download URL | fastapi_cloud_healthcheck_azure_vm-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
574c7f5c334ce18e87590745548855f45247c4a275b4ae405af34af1af611b41
|
|
BLAKE2b-256 checksum How to use checksums |
8439e562c571953677681f333d29c5e2a3e8591a9e50bda1b706bb71e33cdef3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.9.20 Linux/6.8.0-1014-azure
|