Skip to main content

Monitor the Toolkit Run with Sonar

Runbook Azure

DOCUMENT CATEGORY: Runbook SCOPE: Watching the toolkit's runs with azurelocal-sonar PURPOSE: Start Sonar for one stage, know which file it reads, and share one events folder with the toolkit MASTER REFERENCE: azurelocal-sonar documentation

Status: Active. Checked on 2026-11-24 against the main branch of azurelocal-sonar and the toolkit, and Azure Local 2611 (12.2611.1004.9).

azurelocal-sonar is a local, read-only web page. It reads the files that the toolkit and azurelocal-ztp write, and, when you sign in, what Azure reports. It never changes Azure or a machine. For a ZTP run see Monitor the run with Sonar; this page covers the stages after it.


One file, one folder​

Start Sonar from the same infrastructure.yml the toolkit uses:

Connect-AzAccount -Tenant <azure.tenant_id>
./Start-AzlSonar.ps1 -InfrastructureFile ./infrastructure.yml

With -Monitor Auto (the default) Sonar follows the whole flow. To watch one stage, name it with -Monitor. Only that tile shows, only the sources that stage needs are read, and the page title names the stage.

Launch lineShowsReadsAzure sign-in
-Monitor DiscoveryThe hardware discovery: a card per machine with its service tag, ports and MACs, the suggested management port and the BOSS card. Beacon's results and the inventory files are shown here tooThe discovery folder: hardware.discovery.output_directory, else the discovery folder inside provisioning.simplified.evidence_path (and <discovery folder>\beacon)No
-Monitor ProvisioningThe ZTP run, or the OS image routeAzure, the ZTP event file (ztp-events.jsonl)Yes
-Monitor OsConfigurationThe OS configuration: a card per machine, the step it is on, converged, failed or retryingos-configuration-events.jsonl in the events folder, and Azure Arc run commandsYes
-Monitor VerificationThe pre-cluster gate: the verdict, the counts, the checks by category, and a Plan before the gate has runprecluster-verification-events.jsonl in the gate's report directory, and precluster-plan-events.jsonl in the events folderNo
-Monitor Validate, -Monitor DeploymentAzure's validation and deployment step trees, plus the toolkit's own checks, results and elapsed timeThe resources in Azure, the seed node's log, and arm-deployment-events.jsonl in the events folderYes
-Monitor UpdateThe solution update: what Azure offers, the pre-update checks, the run's stepsupdate-events.jsonl in the events folder, and Azure when you sign inOptional

Examples:

# No Azure sign-in needed: the discovery files only
./Start-AzlSonar.ps1 -InfrastructureFile ./infrastructure.yml -Monitor Discovery

# The pre-cluster gate, Plan or Verify: its event files only
./Start-AzlSonar.ps1 -InfrastructureFile ./infrastructure.yml -Monitor Verification

# OS configuration (the Arc run commands need an Azure sign-in)
Connect-AzAccount -Tenant <azure.tenant_id>
./Start-AzlSonar.ps1 -InfrastructureFile ./infrastructure.yml -Monitor OsConfiguration

# An update, with no Azure sign-in: it follows the toolkit's update events only
./Start-AzlSonar.ps1 -InfrastructureFile ./infrastructure.yml -Monitor Update

The events folder​

The toolkit runs write their event feeds into one folder, and Sonar reads the same folder. The toolkit picks it in this order:

  1. deployment.events_directory of infrastructure.yml (environment variables such as %ProgramData% are expanded; a relative path is relative to the folder of the file);
  2. the -ReportDirectory of the run, when you pass one;
  3. %ProgramData%\AzureLocalToolkit\<cluster.name>\events.

Sonar uses the first and the third. A run that you give -ReportDirectory and no deployment.events_directory writes its events into that report directory, where Sonar does not look, and the toolkit says so. Set deployment.events_directory once and the OS configuration, the gate Plan, the ARM run and the update scripts all write where Sonar reads.

FileWritten byFolder
os-configuration-events.jsonlInvoke-AzureLocalOsConfiguration.ps1The events folder
precluster-plan-events.jsonlInvoke-AzureLocalPreClusterVerification.ps1 -Mode PlanThe events folder
precluster-verification-events.jsonlThe same script, -Mode VerifyThe gate's report directory (deployment.pre_cluster_verification_report_directory, else arm-report\verification\live next to the evidence folder)
arm-deployment-events.jsonlInvoke-AzureLocalArmDeployment.ps1The events folder
update-events.jsonlGet-AvailableSolutionUpdate.ps1, Start-AzureLocalSolutionUpdate.ps1The events folder

Each line is one JSON object: timestamp, node, stage, step, state, evidence, level, nextAction and the data of the event. No line holds a secret.

What to expect​

  • The gate Plan reads nothing and has no verdict. Sonar shows it as Planned (grey): which checks would run, and how many of them block. Run the gate in -Mode Verify for a verdict. A result older than its expiry reads Pass expired.
  • The Update monitor without a sign-in reads the event file only. It shows the verdict of a check (UpToDate, UpdateAvailable, AdditionalContentRequired, UpdateRunning, AttentionNeeded) and the stages of an install, and marks the Azure live poll as not connected. That is a fact, not an error. Sign in first and Sonar shows Azure's view as well.
  • A gate result for another file shows "not for this file" and blocks.
  • Beacon's results (<discovery folder>\beacon) and the hardware inventory files are shown in the Discovery view, with their age.

Access​

Read access to the event files' folders is enough for Discovery and Verification. The other monitors need Reader on the resource group; for the node logs of Validate and Deploy, an account in the seed node's local Administrators (the deployment local administrator, not the built-in Administrator, which deployment renames). See Sonar: Log access.


Version Control​

VersionDateAuthorChanges
1.0.02026-11-24Azure Local CloudInitial page