Monitor 100+ Azure SQL and PostgreSQL Databases on AKS with Helm and ADX
A copy-paste production guide: auto-discover Azure SQL and Amazon RDS databases, group shared Elastic Pools onto safe shards, and deploy Culprit's collector on AKS with Workload Identity.
When teams evaluate Microsoft Database Hub vs. Culprit + ADX after the Database Watcher retirement announcement, the most common pushback is operational setup. Turning on a portal checkbox across an Azure subscription feels easier than writing connections.toml files by hand for 120 databases.
Fair point. Nobody wants to maintain static YAML lists every time a team provisions a new microservice database.
That is why we built culprit collect sync-inventory and an official OCI Helm chart (oci://ghcr.io/culpritsql/charts/culprit-collector). You can go from an empty AKS namespace to passwordless, sharded collection across Azure SQL, SQL Server, and PostgreSQL in about twenty minutes.
Step 1: Install the canonical ADX schema
Culprit writes raw telemetry (Activity, WaitCounterSamples, OperationalSamples, DeadlockEvents) plus three synthesized Gold tables (CulpritIncidentsV1, CulpritFindingsV1, CulpritChangesV1) into your existing Kusto database. Long .sqlplan XML and .xel captures stay in a private Azure Blob container referenced by SHA-256 digest.
Generate and apply the ADX schema and typed KQL alert/triage functions once:
culprit collect schema --store adx --database culprit > adx-schema.kql
culprit collect queries --config archive.json --name Prod > adx-helpers.kql
Run both scripts against your ADX database (via Azure CLI, Terraform, or Kusto Web Explorer). Every table uses append-only ingestion with deterministic deduplication headers, so collector restarts never duplicate findings.
Step 2: Auto-discover your fleet and plan shards
Instead of writing target definitions manually, run sync-inventory using your existing az login (or --cloud aws --region us-east-1 for RDS/Aurora):
culprit collect sync-inventory \
--cloud azure \
--shards 4 \
--format helm \
--target-kind adx \
--adx-endpoint https://kusto-prod.eastus.kusto.windows.net \
--adx-database culprit \
--storage-account stculpritprod01 \
--storage-container culprit-native \
--tenant-id 00000000-0000-0000-0000-000000000000 \
--client-id 11111111-1111-1111-1111-111111111111 \
--output-dir ./deploy/fleet
Behind the scenes, the shard planner solves a subtle multi-tenant trap: Elastic Pool and logical-server noisy neighbors.
If 30 databases share one 8-vCore Azure SQL Elastic Pool and four separate Kubernetes pods scrape them at the same second, the collector itself creates a connection burst. sync-inventory groups every database sharing an Elastic Pool, Managed Instance, Azure SQL logical server, or RDS cluster into a single admission_group and hashes that group onto one shard (shard-00 .. shard-03). That single pod serializes budgets and pressure checks across the whole pool without needing cross-pod distributed locks.
Commit the generated ./deploy/fleet/ directory straight into your GitOps repo. Every run is deterministic: adding one database does not reshuffle unrelated shards.
Step 3: Grant least-privilege read-only database roles
Bind your AKS User-Assigned Managed Identity (11111111-...) as a passwordless reader on the target databases.
On Azure SQL Database:
CREATE USER [id-culprit-collector-prod] FROM EXTERNAL PROVIDER;
GRANT VIEW DATABASE PERFORMANCE STATE TO [id-culprit-collector-prod];
GRANT VIEW DEFINITION TO [id-culprit-collector-prod];
On Azure Database for PostgreSQL - Flexible Server (with Entra authentication enabled):
-- Create the Entra principal via pgaadauth_create_principal, then grant read-only stats:
GRANT pg_read_all_stats TO "id-culprit-collector-prod";
If a team forgets VIEW DEFINITION on one database, the scan does not crash. Culprit records the missing source capability in CulpritCollectorConnectionsV1 and keeps collecting waits, sessions, and deadlocks.
Step 4: Validate offline and install via Helm
Before deploying to AKS, run the offline validator in CI to verify every schedule, shard assignment, and HTTPS endpoint without opening any network connections:
for cfg in ./deploy/fleet/shard-*/collector.json; do
culprit collect service validate --config "$cfg"
done
Then deploy each shard with the OCI Helm chart. Each collector pod mounts a small ReadWriteOncePod (or ReadWriteOnce) persistent volume for /var/lib/culprit so its crash-safe outbox can buffer sealed batches if ADX or Blob Storage blips:
helm upgrade --install culprit-collector \
oci://ghcr.io/culpritsql/charts/culprit-collector \
--namespace observability \
--create-namespace \
-f ./deploy/fleet/values.shards.yaml
Verifying live ingestion
Within five minutes, check CulpritCollectorConnectionsV1 and the fleet summary helper in ADX to confirm every target is reporting observed:
ProdFleetSummary(now(), ago(1h), now())
| summarize Targets = count(), ActiveIncidents = sum(ActiveIncidents) by FreshnessState, Engine
Once data is landing, point culprit-archive-web at the read-only ADX endpoint for zero-seat browser triage, and wire culprit collect notify so Slack or PagerDuty pages on culprits rather than raw CPU spikes.
Database Hub in Microsoft Fabric is now GA as Microsoft's replacement for Azure SQL Database Watcher. I put its Fabric Capacity Unit math, Power BI Pro viewer cliff, and portal charts next to running Culprit on your own ADX or ClickHouse cluster.