Skip to main content
Connect AnomalyArmor to your ClickHouse database for schema monitoring and freshness tracking. We support both self-hosted ClickHouse and ClickHouse Cloud.

Requirements

  • ClickHouse version: 21.8 or higher
  • HTTP interface: Enabled (default on most installations)
  • User credentials: With read access to system tables
  • Network access: From AnomalyArmor to your ClickHouse server

Connection Settings

Port Configuration

Always use HTTPS (port 8443) for cloud-hosted or production ClickHouse. HTTP (8123) should only be used for local development.

Provider-Specific Instructions

ClickHouse Cloud

Finding Connection Details:
  1. Go to your ClickHouse Cloud console
  2. Select your service
  3. Click ConnectHTTPS
  4. Copy the connection details
IP Allowlisting:
  1. Go to SettingsSecurity
  2. Under IP Access List, add AnomalyArmor IPs
  3. Save changes
Add the AnomalyArmor IP addresses: 34.xxx.xxx.xxx/32 and 34.xxx.xxx.xxx/32Creating a Read-Only User:

Creating a Read-Only User

Full SQL script for setting up AnomalyArmor access:

Verify Permissions

Test the user can access metadata:

What We Monitor

AnomalyArmor discovers and monitors these ClickHouse objects:

Metadata Captured

For each table:
  • Database and table name
  • Column names and data types
  • Table engine type
  • Partition information
  • Last modification time (for freshness)

What We Query

AnomalyArmor runs these types of queries:
Impact: These are lightweight metadata queries. No table scans.

ClickHouse-Specific Considerations

Table Engines

AnomalyArmor works with all ClickHouse table engines:

ReplicatedMergeTree

For replicated tables, connect to any replica. Schema changes propagate across all replicas, so monitoring one is sufficient.

Distributed Tables

Distributed tables show the schema of the distributed table definition. Underlying shard tables are monitored separately if in the same cluster.

Troubleshooting

Causes:
  • Wrong port (using native port instead of HTTP)
  • Firewall blocking connection
  • HTTP interface disabled
Solutions:
  1. Verify port is 8443 (HTTPS) or 8123 (HTTP)
  2. Check firewall/security group allows AnomalyArmor IPs
  3. Verify HTTP interface is enabled in config.xml
  4. Test: curl https://your-host:8443/ping
Causes:
  • Wrong username or password
  • User doesn’t exist
  • IP not in user’s allowed hosts
Solutions:
  1. Verify credentials
  2. Check user exists: SELECT * FROM system.users WHERE name = 'anomalyarmor'
  3. Verify IP is allowed: Check user’s HOST restrictions
Causes:
  • Self-signed certificate not trusted
  • Certificate hostname mismatch
Solutions:
  1. For ClickHouse Cloud: Should work automatically
  2. For self-hosted: Ensure certificate is valid
  3. Contact support if issues persist with valid certificates
Causes:
  • User lacks SELECT on system tables
  • User lacks access to target databases
Solutions:
Causes:
  • User can only see specific databases
  • All tables in excluded system databases
Solutions:
  1. Grant SHOW privilege: GRANT SHOW ON *.* TO anomalyarmor
  2. Verify tables exist outside system databases
  3. Check AnomalyArmor schema filters

Connection Architecture

ClickHouse Connection Architecture

Best Practices

Use HTTPS in Production

Always use port 8443 with HTTPS for production:
  • Encrypted in transit
  • Required by ClickHouse Cloud
  • Protects credentials

Connect to One Node

For clustered setups, connect to one node. System tables show cluster-wide metadata.

Schedule Discovery After Mutations

If you have regular schema changes (ALTER TABLE), schedule discovery after those operations complete.

Common Questions

Which ClickHouse versions and deployments does AnomalyArmor support?

ClickHouse 21.8+ self-hosted and ClickHouse Cloud are fully supported. Both use the HTTPS/TCP native protocol on port 8443 (Cloud) or 8123/9000 (self-hosted). Older ClickHouse versions may work for basic monitoring but aren’t officially supported - upgrade if possible.

Does AnomalyArmor support ClickHouse materialized views and dictionaries?

Materialized views are first-class assets (schema drift, freshness, metrics all work). Dictionaries are discovered and cataloged but not actively monitored for freshness; treat them as reference metadata.

Can AnomalyArmor monitor freshness on a ClickHouse MergeTree table that uses event-time partitioning?

Yes. Use your event-time column (e.g., event_date, created_at) as the freshness timestamp. AnomalyArmor queries MAX(event_date) which ClickHouse resolves efficiently via partition metadata, even on billion-row tables.

How much load does AnomalyArmor put on my ClickHouse cluster?

Very little. Discovery hits system.tables / system.columns which are metadata tables. Freshness and metrics use MAX / COUNT(*) / uniqExact which ClickHouse optimizes to microseconds on partitioned tables. Expect microseconds-to-low-milliseconds per query.

Next Steps

Run Discovery

Scan your ClickHouse database

Set Up Alerts

Get notified of schema changes