How veeamhub/veeam-healthcheck works
Project type and purpose
• Type: A monolithic .NET desktop utility (C# + XAML GUI + CLI)
• Purpose: Run locally on a Veeam Backup & Replication or Veeam Backup for Microsoft 365 server, collect configuration and performance data, analyze it, and generate an HTML-based health-check report (plus CSV artifacts).
File structure
• Top-level solution (vHC/HC.sln) contains:
– HC_Reporting project: the main application
· Startup (orchestration): EntryPoint.cs, argument parsing, admin/hotfix checks, mode selection
· Functions:
· Collection: PS script invoker, registry reader, SQL executor, log parser, impersonation
· Analysis: data-model objects and algorithmic calculations
· Reporting: CSV handlers, data-type parsers, HTML exporter (uses ReportScript.js, css.css)
· Common utilities: logging, XML scrubber, global constants
· Resources & Localization: .resx files, PS scripts to build resource files
· Tools & Build scripts: PowerShell/Batch/shell scripts for collecting data and building localization
· GUI (VhcGui.xaml + code-behind)
– VhcXTests project: xUnit/MSTest-style unit tests covering argument parsing, reporting, CSV parsing, HTML exporting, logging
• CI/CD: GitHub workflows for static analysis (Semgrep, CodeQL) and virus scanning
• Presentation Layer
– EntryPoint (CLI) and XAML GUI
• Orchestration Layer
– Startup services: Admin check, hotfix detector, argument parser, mode selector, client functions
• Data Collection Services
– PowerShell invoker (PSCollections)
– Registry/DB accessor
– Log parser
• Analysis Services
– DataModels (Analysis/DataModels)
– Business logic for job session statistics, concurrency, success rates
• Reporting Services
– CSV handlers (Functions/Reporting/CsvHandlers)
– DataType parsers (Functions/Reporting/DataTypes)
– HTML exporter (Functions/Reporting/Html)
• Infrastructure & Utilities
– Logging (Common/Logging)
– Scrubber (Common/Scrubber)
– Global constants (Common/CGlobals)
– Localization resources
• Outputs
– HTML report
– CSV files
– Sample HTML (SAMPLE folder)
• External dependencies
– Veeam Backup & Replication / VB365 installation (local DB, registry, logs)
– PowerShell runtime
– File system (C:\temp\vHC)
Relationships and data flow
1. User invokes EntryPoint (CLI args or GUI click).
2. Startup orchestrator validates environment (admin, hotfix), parses options.
3. Orchestrator calls Collection services in parallel or sequence:
– PS scripts to collect data (VB365/VBR)
– Registry reader & SQL queries to the Veeam database
– Log file parser
4. Raw data fed into Analysis services:
– Build in-memory data models
– Perform calculations (durations, concurrency heat maps, success rates)
5. Analysis results passed to Reporting services:
– Generate CSVs via CsvHandlers
– Transform data into HTML via HtmlExporter (templating, CSS, ReportScript.js)
6. Outputs written to disk under C:\temp\vHC
7. Unit tests validate each component in VhcXTests
Architectural patterns & design principles
• Layered architecture (Presentation → Orchestration → Services → Infrastructure)
• Single responsibility: each namespace folder holds a service type
• Modular extension via PS scripts and localization resources
• Dependency inversion for logging and CSV reader interfaces
• Parallel or sequential task execution orchestrated from Startup
Essential elements
• Clear component names & package paths
– Project modules (Common, Collection, Analysis, Reporting, Startup)
– Infrastructure (Logging, Scrubber)
– External systems and outputs