Skip to main content

This package is designed to validate the operational status of Azure Virtual Machines (VMs). It provides comprehensive diagnostics on the health of an Azure VM by checking its power state, disk health, and network interface status.

Project description

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)

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

Built Distribution

File details

Details for the file fastapi_cloud_healthcheck_azure_vm-1.0.1.tar.gz.

File metadata

File hashes

Hashes for fastapi_cloud_healthcheck_azure_vm-1.0.1.tar.gz
Algorithm Hash digest
SHA256 eef6431f499ee8ce4ab0b07ff1c6fe80bfdf2ac7f801eae38a8be8b0678d3db5
MD5 bbcd9ef023dba33b66b6d9d28f7627ae
BLAKE2b-256 1d5e0b0c4c6d478e1b83691a81fc0739af7e514dd23f4e053e6b6e56bbea744e

See more details on using hashes here.

File details

Details for the file fastapi_cloud_healthcheck_azure_vm-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_cloud_healthcheck_azure_vm-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 574c7f5c334ce18e87590745548855f45247c4a275b4ae405af34af1af611b41
MD5 9a72cbe98f0b59c8990e674e9a35731e
BLAKE2b-256 8439e562c571953677681f333d29c5e2a3e8591a9e50bda1b706bb71e33cdef3

See more details on using hashes here.

Supported by

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