Post-deployment health check
This page contains third-party references. We strive to keep our content up to date, but information about external vendors may change independently of Omada. If you spot any inconsistencies, report them through the support channel.
The health check script (health_check.sh) validates that a deployed Omada Identity Cloud Private environment is running correctly. It checks endpoint availability, pod readiness, component versions, error logs, Service Bus dead letters, and the import pause state, and produces a summary report suitable for pre-handover validation or routine operational checks.
Prerequisites
Before running the script, ensure the following:
- Azure CLI is installed and authenticated (
az login) against the correct subscription. jqandcurlare available on the machine running the script.- The executing identity has the following RBAC permissions on the environment resource group.
| Permission | Purpose |
|---|---|
Microsoft.ContainerService/managedClusters/read | Azure Kubernetes Service (AKS) – read cluster |
Microsoft.ContainerService/managedClusters/listClusterAdminCredential/action | AKS – list admin credentials |
Microsoft.Web/sites/read | App Service – read site |
Microsoft.Web/sites/config/read | App Service – read config |
Microsoft.Web/sites/config/list/action | App Service – list app settings |
Microsoft.OperationalInsights/workspaces/read | Log Analytics – read workspace |
Microsoft.OperationalInsights/workspaces/query/*/read | Log Analytics – query |
Microsoft.ServiceBus/namespaces/read | Service Bus – list namespaces |
Microsoft.ServiceBus/namespaces/topics/read | Service Bus – list topics |
Microsoft.ServiceBus/namespaces/topics/subscriptions/read | Service Bus – list subscriptions |
Some of these permissions are not included in the built-in Reader role. Assign a custom role covering all 10 actions, or use Contributor / Owner. RBAC changes can take 5–10 minutes to propagate after assignment.
Run the script
From the directory where you extracted the installation package, run:
Tool: Bash shell
./scripts/health_check.sh --global-prefix <global-prefix> \
--tfvars-path ./Deployment_OICP_<version>/run-<project_name>-<workspace_prefix>/instance/infrastructure/iac/variables.auto.tfvars.json \
[--log-window-minutes <n>]
From scripts/install, run ../health_check.sh instead, and start the --tfvars-path value with ../../ instead of ./. Without --tfvars-path, the script looks for infrastructure/iac/variables.auto.tfvars.json next to scripts/. The installation package does not contain that file, so the version check is skipped, and every AKS deployment reports FAIL. Always pass --tfvars-path.
| Flag | Required | Description |
|---|---|---|
--global-prefix | Yes | Environment global prefix (for example, oisaas-ab0001). |
--tfvars-path | Recommended | Path to the installed variables.auto.tfvars.json, which holds the versions you deployed (see the command above). Default: infrastructure/iac/variables.auto.tfvars.json relative to the package root, which the installation package does not contain. |
--log-window-minutes | No | Time window for error log check in minutes (default: 30). |
--apps-config | No | Path to health_check_apps.json (default: scripts/health_check_apps.json). |
--dns-zone | No | DNS zone for the Enterprise Server (AKS) endpoint. Auto-detected from config.artifact_source.dns_zone_name in --tfvars-path if not provided. Pass explicitly to override. |
--retries | No | Extra retry attempts for transient failures (default: 2). |
--retry-delay | No | Seconds between retry attempts (default: 2). |
--manifest | No | Path to a manifest JSON to use as the expected-version source (enables manifest mode). |
--use-manifest | No | Manifest mode: use a local manifest.json, or fetch <global-prefix>.json from blob storage if no local file exists. |
Exit codes:
0– all checks passed, or only warnings.1– one or more FAIL results.
What the script checks
The script runs six checks in sequence.
Check 1: Endpoint ping
Verifies that all services respond on their expected endpoints. All requests run in parallel – the total time equals the slowest single endpoint (15-second timeout).
| Result | HTTP response |
|---|---|
| PASS | 200, 301, 302, 401 |
| WARN | 404 (endpoint not found), 503 (cold start) |
| FAIL | 000 (no connection / timeout), 5xx |
Web apps are checked at /swagger/index.html. Function apps are checked at /api/Heartbeat – a 404 response is treated as WARN rather than FAIL, since not all function apps expose an HTTP trigger.
Check 2: AKS pod readiness
Checks that each AKS deployment has at least one ready pod. All deployments run in the <global-prefix> namespace. The following deployments are checked.
| Deployment | Service |
|---|---|
<global-prefix>-es | Enterprise Server |
<global-prefix>-rope | Role and Policy Engine |
<global-prefix>-timer | Timer |
<global-prefix>-cagops | CAG Operations |
<global-prefix>-vault | Vault |
<global-prefix>-cag-iw-default | CAG import worker (Default instance group) |
<global-prefix>-cag-iw-omadahosted | CAG import worker (OmadaHosted instance group) |
<global-prefix>-cag-pw-default | CAG provisioning worker (Default instance group) |
<global-prefix>-cag-pw-omadahosted | CAG provisioning worker (OmadaHosted instance group) |
If no version is configured for a deployment and the deployment does not exist, the check reports WARN (not deployed). If the deployment exists but no version is configured for it, the check reports FAIL.
If kubectl is unavailable or the AKS cluster is unreachable, this check is skipped with WARN.
Check 3: Component version verification
Confirms that all running components match the versions declared in variables.auto.tfvars.json. Checks both App Service / Function App blob URLs (WEBSITE_RUN_FROM_PACKAGE) and AKS container image tags, including the four CAG worker deployments listed in Check 2. All app settings calls run in parallel.
By default, expected versions are read from variables.auto.tfvars.json (config mode); with --manifest or --use-manifest, they are read from a release manifest instead.
| Result | Condition |
|---|---|
| PASS | Running version matches the expected version. |
| WARN | The expected version key is not found in the version source, or the running version could not be parsed from the blob URL. |
| FAIL | The running version differs from the expected version, or WEBSITE_RUN_FROM_PACKAGE is not set. |
Check 4: Error log report
Queries the Log Analytics workspace (<global-prefix>-law) for errors across three sources within the configured time window.
| Source | What is checked |
|---|---|
OIS (OIS_CL) | Custom log table entries at Level_d 1 (Error) or 2 (Warning). |
| LRDO | Container logs from pods matching lrdo* (long-running data operations), filtered to critical/error log levels or messages containing fail, error, or exception. |
| CAG | Container logs from the cag-iw-* (import worker) and cag-pw-* (provisioning worker) containers – both instance groups – filtered the same way as LRDO. |
Each source is reported independently as PASS or WARN – not FAIL, since isolated log errors do not necessarily block handover. For each source with errors, the report includes a per-component/pod/container breakdown, a deep link to the relevant Log Analytics logs blade, and the underlying Kusto Query Language query (including a ±5-minute context query for investigation).
If Log Analytics is not enabled for the environment (for example, in some development workspaces), all three checks are skipped and reported as N/A.
Check 5: Service Bus dead letters
Checks all Service Bus namespaces in the resource group for dead-lettered messages. Dead letters indicate processing failures that were not retried successfully.
- Dead letter count = 0 → PASS
- Dead letter count > 0 → WARN with per-topic/subscription breakdown
Namespace and topic checks run in parallel at two levels – the total time equals the slowest single namespace.
Check 6: Import pause state
Checks whether imports are paused. During a run against an existing environment, the installation script pauses new imports and resumes them when the run finishes. If the run is interrupted or fails, imports can stay paused. The check reads the Environment__IsImportOperational app setting on the COPS API web app (<global-prefix>-wa-copsapi).
| Result | Condition |
|---|---|
| PASS | Environment__IsImportOperational is true – imports are running. |
| WARN | The COPS API web app is not found, or the setting is not set. Also reported when the setting is false while the installation script itself is still running – the pause is expected at that point. |
| FAIL | Environment__IsImportOperational is false and no installation script run is in progress – imports are stuck paused. |
If the check reports FAIL, an earlier installation script run was interrupted before it could release the pause. If that run also needs to be completed, rerun the installation script, for example, with --resume. It releases the pause when it exits. Otherwise, release the pause directly.
Tool: Bash shell
az webapp config appsettings set --name <global-prefix>-wa-copsapi \
--resource-group <global-prefix>-rg --settings Environment__IsImportOperational=true
Changing this setting restarts COPS API, so imports resume after a short delay.
Interpreting results
Each check produces a line per resource with a PASS, WARN, FAIL, or N/A label, followed by a summary, as in the following example.
Checking required Azure permissions on oisaas-ab0001-rg...
PASS AKS — read cluster Microsoft.ContainerService/managedClusters/read
...
All required permissions present.
╔════════════════════════════════════════════════════════════╗
║ Omada Private Cloud - Environment Health Check ║
╚════════════════════════════════════════════════════════════╝
Health Check Details:
Workspace : oisaas-ab0001
Subscription : <subscription-id>
Resource group : oisaas-ab0001-rg
Date/Time : 2026-11-16 02:58 UTC
Version : 1.0.24
Version source : tfvars (<deployment-folder>/instance/infrastructure/iac/variables.auto.tfvars.json)
==> [1/6] ENDPOINT PING
PASS oisaas-ab0001-wa-copsapi https://oisaas-ab0001-wa-copsapi.azurewebsites.net/swagger/index.html (200)
PASS ES (AKS) https://oisaas-ab0001-forms.<dns-zone>/loadbalancer.aspx (200)
PASS oisaas-ab0001-fa-ci-aj (Heartbeat) https://oisaas-ab0001-fa-ci-aj.azurewebsites.net/api/Heartbeat (401)
...
elapsed: 5s
==> [2/6] AKS POD READINESS
PASS oisaas-ab0001-es 1 pod(s) ready
PASS oisaas-ab0001-rope 1 pod(s) ready
PASS oisaas-ab0001-timer 1 pod(s) ready
PASS oisaas-ab0001-cagops 1 pod(s) ready
PASS oisaas-ab0001-vault 1 pod(s) ready
PASS oisaas-ab0001-cag-iw-default 1 pod(s) ready
PASS oisaas-ab0001-cag-iw-omadahosted 1 pod(s) ready
PASS oisaas-ab0001-cag-pw-default 1 pod(s) ready
PASS oisaas-ab0001-cag-pw-omadahosted 1 pod(s) ready
elapsed: 2s
==> [3/6] BLOB VERSION CHECK
PASS oisaas-ab0001-wa-is 16.0.0.235_477723_c52e53d…
PASS oisaas-ab0001-es 160122
PASS oisaas-ab0001-cag-iw-default 16.0.0.273-release
...
elapsed: 13s
==> [4/6] ERROR LOGS (last 30m)
WARN OIS_CL — 1 component(s) with Level_d in (1=Error, 2=Warning):
Component=OPS Level_d=2 Count=4
↳ Logs: <link to the Log Analytics workspace logs>
↳ KQL:
OIS_CL
| where TimeGenerated > ago(30m) and Level_d in (1, 2)
| summarize count() by Component_s, Level_d
↳ Context (±5m):
...
PASS LRDO — no errors/criticals in last 30m
PASS CAG — no errors/criticals in last 30m (4 CAG worker containers)
elapsed: 9s
==> [5/6] SERVICE BUS DEAD LETTERS
PASS oisaas-ab0001-en-bus 0 dead letters (13s)
PASS oisaas-ab0001-is-bus 0 dead letters (11s)
PASS oisaas-ab0001-ps-bus 0 dead letters (13s)
elapsed: 15s
==> [6/6] IMPORT PAUSE STATE
PASS oisaas-ab0001-wa-copsapi Environment__IsImportOperational=true (imports operational)
elapsed: 6s
╔════════════════════════════════════════════════════════════╗
║ SUMMARY: 65 passed | 0 failed | 1 warned ║
╚════════════════════════════════════════════════════════════╝
RESULT : WARN — review warnings before handover
HEALTH_CHECK_RESULT=WARN
The final result is:
- PASS – all checks passed; the environment is ready for handover.
- WARN – one or more checks produced a warning, but nothing failed; review before handover.
- FAIL – one or more checks failed; investigate before handover.
The last line of the output, HEALTH_CHECK_RESULT=<PASS|WARN|FAIL>, repeats the final result in a fixed format. If you run the health check from your own scripts, read the result from this line. The exit code is 0 for both PASS and WARN, so it cannot distinguish between them.
Known limitations
- Permission pre-check is informational only. WARN results in the permissions pre-check do not abort the run – they indicate which downstream checks are likely to fail and why.
notActions(deny overrides) are not evaluated. - AKS checks require
kubectl. Ifkubectlis absent or the cluster is unreachable, check 2 is skipped with WARN, and check 3's AKS container-tag check is skipped with WARN as well (its blob-version checks still run). - Log Analytics must be enabled. Check 4 is skipped with N/A in environments where Log Analytics is not configured.
- Timeout flakiness. Occasional FAIL results on timeout-sensitive checks may resolve on a second run.
- Naming convention dependency. The script derives resource names from the global prefix. Customized resource names require updating
scripts/health_check_apps.json.
If the health check reports failures or warnings and you need to troubleshoot further, see Collecting debug logs to gather diagnostic data for analysis or to send to Omada Support.