Script icon
Docker icon
If icon
SlackIncomingWebhook icon
Log icon
Return icon
Schedule icon

OpenStack Nova Hypervisor Overcommit and Service Sentinel

Scrapes OpenStack Prometheus metrics to track down nova-compute services, hypervisor RAM overcommit, and build failures with Slack alerting.

Categories
CloudInfrastructure

Production-grade private cloud infrastructure watchdog that continuously monitors OpenStack Nova compute clusters. It tracks hypervisor memory overcommit ratios across KVM host aggregates, detects down or disabled nova-compute agent services, monitors virtual machine instance provisioning build failures, and triggers structured Slack alerts before tenant workload provisioning freezes.

How it works

  1. A recurring schedule trigger wakes the flow every 15 minutes to initiate OpenStack Nova surveillance.
  2. A containerized Python script polls the OpenStack Prometheus metrics exporter endpoint (:9180/metrics).
  3. The script extracts compute service statuses (openstack_nova_service_status) for disabled and down agents.
  4. The script calculates physical hypervisor RAM overcommit consumption against cluster allocation ratios.
  5. A decision gate evaluates whether down compute services or hypervisor memory pressure breach capacity margins.
  6. When hypervisor degradation occurs, high-priority notifications dispatch to Infrastructure SRE channels with runbooks.
  7. A structured audit manifest is emitted for enterprise compliance records and private cloud capacity archives.

Architecture diagram

flowchart TD
    A[Schedule Trigger: Every 15 Mins] --> B[scan_openstack_compute_metrics]
    B --> C{evaluate_openstack_threshold}
    C -- Alert Triggered --> D[notify_slack_infrastructure_team]
    C -- Nominal State --> E[log_nominal_openstack_state]
    D --> F[emit_audit_manifest]
    E --> F[emit_audit_manifest]

Architecture components

  • Trigger (periodic_openstack_audit): Recurring cron schedule executing every 15 minutes for proactive compute surveillance.
  • Scraper Task (scan_openstack_compute_metrics): Docker-isolated Python script polling OpenStack exporter metrics.
  • Decision Gate (evaluate_openstack_threshold): Evaluates down compute services and RAM overcommit against user thresholds.
  • Notification Task (notify_slack_infrastructure_team): Sends rich Slack alert with host counts, RAM usage, and runbooks.
  • Compliance Manifest (emit_audit_manifest): Emits structured JSON summary for infrastructure audit archives.

Key capabilities

  • Continuous surveillance of physical KVM hypervisor health and nova-compute agent heartbeat status.
  • Early warning for hypervisor RAM overcommit saturation before host Linux kernels trigger OOM kills.
  • Detection of silent node failures preventing nova-scheduler from placing new virtual machine instances.
  • Standardized Slack alerting with operational runbook instructions for virtualization administrators.

What you get

  • Real-time visibility into OpenStack compute fabric availability and virtualization headroom.
  • Protection against host freeze events caused by oversubscribed memory allocations on hypervisors.
  • Automated Slack incident notifications with down host identities and live-migration guidance.
  • Clean compliance manifests recording private cloud compute availability for infrastructure audit trails.

Who it's for

  • Private Cloud Infrastructure Engineers operating large-scale OpenStack deployments.
  • Virtualization Administrators maintaining Linux KVM hypervisor aggregates and Ceph block backends.
  • Site Reliability Engineers safeguarding internal platform-as-a-service (PaaS) and VM infrastructure.
  • Enterprise Systems Architects enforcing compute capacity planning and hardware reliability standards.

Why orchestrate this with Kestra

  • Decoupled Architecture: Scrapes metrics externally without requiring root SSH access to bare-metal compute nodes.
  • Deterministic Scheduling: Native cron scheduling ensures consistent surveillance without cron daemon drift.
  • Isolated Execution: Runs Python scrapers inside isolated Docker containers with pre-installed libraries.
  • Enterprise Auditability: Generates structured execution histories and JSON manifests for regulatory reporting.

Use cases

  • Physical Node Hardware Outage: Detect when a hypervisor loses power or network and marks services down.
  • Overcommit Capacity Planning: Ensure RAM allocation ratios (e.g. 1.5x) do not cause physical swap trashing.
  • Nova-Scheduler Filter Stalls: Identify when all hosts in an aggregate fail RamFilter or DiskFilter checks.
  • Maintenance Evacuation Verification: Confirm that instances have evacuated a host before disabling compute services.

Inputs

Name Type Default Description
openstack_metrics_url STRING http://openstack-exporter.openstack.svc.cluster.local:9180 Base HTTP URL exposing OpenStack Prometheus metrics.
availability_zone STRING nova-zone-us-central Target OpenStack Nova availability zone under active surveillance.
max_down_services_threshold INT 1 Maximum allowable down compute services before alerting.
lookback_minutes INT 15 Lookback evaluation window in minutes for compute telemetry.
alert_on_openstack_failures BOOL true Toggle Slack alert dispatch upon detecting down services or RAM saturation.

Expected outputs

  • {{ outputs.scan_openstack_compute_metrics.vars.down_compute_services_count }}: Count of nova-compute services in down state.
  • {{ outputs.scan_openstack_compute_metrics.vars.disabled_compute_nodes_count }}: Total number of administratively disabled compute hosts.
  • {{ outputs.scan_openstack_compute_metrics.vars.hypervisor_ram_used_pct }}: Percentage of physical hypervisor RAM capacity consumed.
  • {{ outputs.scan_openstack_compute_metrics.vars.active_hypervisors_count }}: Total number of active hypervisors participating in zone.
  • {{ outputs.scan_openstack_compute_metrics.vars.is_alerting }}: Boolean flag indicating whether failure thresholds were breached.
  • {{ outputs.emit_audit_manifest.value }}: Structured JSON audit manifest emitted for compliance archives.

Prerequisites

  • OpenStack cluster deployed with OpenStack Exporter service exposing metrics on port 9180.
  • Exporter port reachable from the Kestra worker execution environment.
  • Docker daemon running on the Kestra host to execute containerized Python tasks.

Secrets

  • SLACK_WEBHOOK_URL: Incoming webhook URL for the target Infrastructure SRE Slack alerting channel.

Quick start

  1. Ensure OpenStack exporter is scraping Nova APIs with valid Keystone service credentials.
  2. Configure the SLACK_WEBHOOK_URL secret in your Kestra namespace settings.
  3. Specify your availability zone name in availability_zone.
  4. Execute a manual test run via the Kestra UI to verify metric ingestion.
  5. Enable the periodic_openstack_audit trigger to establish automated continuous surveillance.

Common pitfalls and troubleshooting

  • RabbitMQ Message Queue Latency: Stalled RPC messages in RabbitMQ cause false down service reports in Nova.
  • Libvirt Daemon Crashes: Unresponsive libvirtd daemons prevent nova-compute from reporting hypervisor stats.
  • Keystone Token Expiration: Expired Keystone admin credentials cause the exporter to return HTTP 401 Unauthorized.
  • Overcommit Memory Ballooning: Linux KSM (Kernel Samepage Merging) latency delays memory reclaim under load.

How to extend

  • Automated Live-Migration Trigger: Chain a task to trigger nova live-migration for instances on saturated nodes.
  • Host Disable Automation: Trigger an administrative API call to disable scheduling on a degrading hypervisor.
  • PagerDuty Escalation: Escalate to on-call infrastructure engineers if down compute services exceed 3 hosts.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.