Connect AnomalyArmor to your ClickHouse database for schema monitoring and freshness tracking. We support both self-hosted ClickHouse and ClickHouse Cloud.Documentation Index
Fetch the complete documentation index at: https://docs.anomalyarmor.ai/llms.txt
Use this file to discover all available pages before exploring further.
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
| Field | Description | Example |
|---|---|---|
| Connection Name | Friendly identifier | ClickHouse Analytics |
| Host | ClickHouse hostname | xxx.clickhouse.cloud |
| Port | HTTP(S) port | 8443 (HTTPS) or 8123 (HTTP) |
| Database | Database name | default |
| Username | ClickHouse user | anomalyarmor |
| Password | User password | •••••••• |
Port Configuration
| Port | Protocol | When to Use |
|---|---|---|
8443 | HTTPS | ClickHouse Cloud and production |
8123 | HTTP | Development or internal networks |
9440 | Native TLS | Not supported (use HTTP interface) |
Provider-Specific Instructions
- ClickHouse Cloud
- Self-Hosted
- Altinity Cloud
- Docker/Local
ClickHouse Cloud
Finding Connection Details:- Go to your ClickHouse Cloud console
- Select your service
- Click Connect → HTTPS
- Copy the connection details
- Go to Settings → Security
- Under IP Access List, add AnomalyArmor IPs
- Save changes
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:| Object Type | Monitored | Notes |
|---|---|---|
| Tables | Yes | All table engines |
| Views | Yes | Standard views |
| Materialized Views | Yes | Including underlying tables |
| Dictionaries | No | Coming soon |
| Functions | No | Not supported |
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:ClickHouse-Specific Considerations
Table Engines
AnomalyArmor works with all ClickHouse table engines:| Engine | Schema Monitoring | Freshness |
|---|---|---|
| MergeTree family | Full | Yes |
| Log family | Full | Limited |
| Distributed | Full | Via underlying tables |
| View | Full | N/A |
| MaterializedView | Full | Yes |
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
Connection refused
Connection refused
Causes:
- Wrong port (using native port instead of HTTP)
- Firewall blocking connection
- HTTP interface disabled
- Verify port is 8443 (HTTPS) or 8123 (HTTP)
- Check firewall/security group allows AnomalyArmor IPs
- Verify HTTP interface is enabled in config.xml
- Test:
curl https://your-host:8443/ping
Authentication failed
Authentication failed
Causes:
- Wrong username or password
- User doesn’t exist
- IP not in user’s allowed hosts
- Verify credentials
- Check user exists:
SELECT * FROM system.users WHERE name = 'anomalyarmor' - Verify IP is allowed: Check user’s HOST restrictions
SSL certificate error
SSL certificate error
Causes:
- Self-signed certificate not trusted
- Certificate hostname mismatch
- For ClickHouse Cloud: Should work automatically
- For self-hosted: Ensure certificate is valid
- Contact support if issues persist with valid certificates
Permission denied
Permission denied
Causes:
- User lacks SELECT on system tables
- User lacks access to target databases
No tables found
No tables found
Causes:
- User can only see specific databases
- All tables in excluded system databases
- Grant
SHOWprivilege:GRANT SHOW ON *.* TO anomalyarmor - Verify tables exist outside system databases
- Check AnomalyArmor schema filters
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 hitssystem.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
