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.Next Steps
Run Discovery
Scan your ClickHouse database
Set Up Alerts
Get notified of schema changes
