Load Balancer Ghost Hunter

Azure Load BalancerGhost Hunter

Professional PowerShell script that hunts down forgotten and unused Azure Load Balancers consuming resources but not serving traffic. Intelligent ghost scoring with cost estimation and comprehensive reporting.

Quick Start
# Hunt all subscriptions
.\Azure-LoadBalancer-GhostHunter.ps1
# Target specific subscription
.\Azure-LoadBalancer-GhostHunter.ps1 -SubscriptionIds "sub-id"
# Custom output path
.\Azure-LoadBalancer-GhostHunter.ps1 -CsvPath "./reports/"

Intelligent Ghost Detection

Advanced analysis and scoring system to identify unused Azure Load Balancers with precision

Ghost Scoring System

Intelligent scoring algorithm that analyzes multiple factors to determine ghost likelihood (0-100 scale)

Comprehensive Analysis

Analyzes backend pools, load balancing rules, NAT rules, frontend IPs, and health probes

Cost Estimation

Calculates monthly cost estimates based on load balancer SKU and configuration complexity

Status Classification

Categorizes load balancers as Definite Ghost, Likely Ghost, Suspicious, Review Needed, or Active

Multi-Subscription Support

Scans across multiple Azure subscriptions with proper authentication and access control

Health Probe Analysis

Evaluates health probe configurations to identify load balancers without proper health monitoring

Backend Pool Intelligence

Analyzes backend pool configurations and member counts to identify unused or empty pools

Detailed Reporting

Generates comprehensive CSV and HTML reports with ghost scores, cost estimates, and recommendations

Ghost Scoring Algorithm

Intelligent multi-factor analysis to determine load balancer utilization and ghost likelihood

Scoring Factors

Backend Pool Analysis (50 points)

  • • No backend pools configured (+50 points)
  • • All backend pools are empty (+45 points)
  • • Some backend pools are empty (+25 points)

Load Balancing Rules (30 points)

  • • No load balancing rules configured (+30 points)

Health Probes (20 points)

  • • No health probes configured (+20 points)

Additional Factors

  • • No inbound NAT rules (+10 points)
  • • No frontend IP configurations (+40 points)
  • • Unused frontend IP configurations (+15 points)

Ghost Classification

DEFINITE GHOST

Score ≥ 80

Load balancers with minimal or no configuration. Strong candidates for immediate cleanup.

LIKELY GHOST

Score ≥ 60

Load balancers with significant configuration gaps. Require investigation before cleanup.

SUSPICIOUS

Score ≥ 40

Load balancers with some concerning patterns. Monitor usage and validate necessity.

REVIEW NEEDED

Score ≥ 20

Load balancers with partial configuration. Review for optimization opportunities.

ACTIVE

Score < 20

Load balancers with comprehensive configuration. Likely serving active traffic.

Usage Examples

Real-world scenarios for Azure Load Balancer optimization and ghost detection

Complete Tenant Scan

.\Azure-LoadBalancer-GhostHunter.ps1

Scans all accessible subscriptions to identify ghost load balancers across your entire Azure tenant.

Targeted Subscription Analysis

.\Azure-LoadBalancer-GhostHunter.ps1 -SubscriptionIds "sub-123,sub-456"

Focuses analysis on specific subscriptions for targeted ghost hunting and cost optimization.

Custom Report Location

.\Azure-LoadBalancer-GhostHunter.ps1 -CsvPath "./reports/" -HtmlPath "./reports/"

Specifies custom output directories for CSV and HTML reports with organized file management.

Comprehensive Analysis

.\Azure-LoadBalancer-GhostHunter.ps1 -SubscriptionIds "prod-sub" -CsvPath "./audit/"

Performs detailed analysis of production subscription with audit-ready reporting for compliance.

Technical Specifications

Enterprise-grade PowerShell script with comprehensive Azure Load Balancer analysis capabilities

Requirements

PowerShell 5.1+

Modern PowerShell with Azure module support

Azure PowerShell Modules

Az.Accounts, Az.Network, Az.Resources modules installed

Azure Authentication

Valid Azure credentials with appropriate permissions

IAM Permissions

Reader role on target subscriptions and load balancer resources

Network Connectivity

Internet access to Azure management endpoints

Command Line Parameters

-CsvPath

Path for CSV export (default: timestamped file)

-HtmlPath

Path for HTML report (default: timestamped file)

-SubscriptionIds

Comma-separated subscription IDs to scan

Core Features

Analysis Engine

  • • Multi-factor ghost scoring algorithm (0-100 scale)
  • • Backend pool configuration analysis
  • • Load balancing rules evaluation
  • • Health probe configuration assessment

Cost Analysis

  • • Monthly cost estimation by SKU type
  • • Standard Load Balancer: $22.56 base cost
  • • Basic Load Balancer: $18.25 estimated cost
  • • Rule-based cost calculations with complexity factors

Reporting Capabilities

  • • Detailed CSV export with all metrics
  • • Rich HTML reports with visual styling
  • • Ghost status classification and recommendations
  • • Backend pool member count analysis

Enterprise Features

  • • Multi-subscription scanning with parallel processing
  • • Comprehensive error handling and logging
  • • CloudCostChefs professional styling and branding
  • • Detailed progress tracking and status updates

Comprehensive Reporting

Professional reporting in multiple formats with detailed analytics and actionable insights

CSV Data Export

Structured CSV export optimized for data analysis, filtering, and integration with business intelligence tools.

Load balancer configuration details
Ghost scores and status classifications
Monthly cost estimates and SKU information
Backend pool member counts and details
Resource group and subscription organization

HTML Executive Report

Rich HTML report with CloudCostChefs styling, ghost status visualization, and executive-friendly presentation.

Executive summary with key findings
Ghost status distribution with color coding
Cost impact analysis and potential savings
Detailed load balancer analysis tables
Professional CloudCostChefs branding and styling

Chef's Tips & Best Practices

Professional recommendations for effective Azure Load Balancer ghost hunting and optimization

Authentication Setup

Ensure proper Azure PowerShell authentication before running the script. Like prepping your kitchen, proper authentication ensures smooth ghost hunting operations.

Subscription Strategy

Start with non-production subscriptions to understand ghost patterns. Like tasting ingredients before the final dish, test your approach before production hunting.

Score Interpretation

Focus on "Definite Ghost" (80+) and "Likely Ghost" (60+) scores for immediate action. Like identifying overripe ingredients, high scores indicate clear cleanup candidates.

Cost Impact Analysis

Use cost estimates to prioritize cleanup efforts and calculate potential savings. Standard Load Balancers cost more than Basic, making them higher priority targets.

Stakeholder Communication

Use HTML reports for executive communication and CSV data for technical analysis. Present findings like a chef explaining the menu - clear, professional, and actionable.

Regular Monitoring

Schedule regular ghost hunting sessions to prevent accumulation of unused resources. Like maintaining a clean kitchen, regular monitoring prevents ghost buildup.

Ready to Hunt Azure Load Balancer Ghosts?

Download the Azure Load Balancer Ghost Hunter and start identifying unused load balancers consuming resources in your Azure environment. Professional ghost detection with intelligent scoring.