|
| 1 | +## All options defined here are available to all instances. |
| 2 | +# |
1 | 3 | init_config: |
2 | 4 |
|
3 | 5 | instances: |
4 | | - - service_id: "<your-service-uuid>" # required – ClickHouse Cloud service UUID |
5 | | - key_id: "<your-api-key-id>" # required – Cloud API key ID |
6 | | - key_secret: "<your-api-key-secret>" # required – Cloud API key secret |
7 | 6 |
|
8 | | - # Cluster / service identity |
9 | | - cluster_name: "<your-cluster-name>" # used as the "service" field in Datadog Logs |
10 | | - # (default: "clickhouse") |
| 7 | + ## @param service_id - string - required |
| 8 | + ## ClickHouse Cloud service UUID. |
| 9 | + ## Found in the ClickHouse Cloud console under your service's connection details. |
| 10 | + # |
| 11 | + - service_id: "<your-service-uuid>" |
11 | 12 |
|
12 | | - # Log collection toggles |
13 | | - collect_query_logs: true # default: true |
14 | | - collect_text_logs: true # default: true |
| 13 | + ## @param key_id - string - required |
| 14 | + ## ClickHouse Cloud API key ID. |
| 15 | + ## Create one at https://clickhouse.cloud/settings/api-keys with query access. |
| 16 | + # |
| 17 | + key_id: "<your-api-key-id>" |
15 | 18 |
|
16 | | - # Tuning |
17 | | - log_batch_size: 1000 # rows per check run (1–10000) |
18 | | - slow_query_threshold_ms: 5000 # marks query logs as warning (0–3600000) |
19 | | - initial_backfill_minutes: 60 # lookback window on first run (1–1440) |
20 | | - query_timeout_seconds: 30 # HTTP timeout per query (5–300) |
| 19 | + ## @param key_secret - string - required |
| 20 | + ## ClickHouse Cloud API key secret (paired with key_id above). |
| 21 | + # |
| 22 | + key_secret: "<your-api-key-secret>" |
21 | 23 |
|
22 | | - # Applied to all logs shipped |
23 | | - tags: |
24 | | - - "env:prod" |
25 | | - - "clickhouse_cluster:<your-cluster-name>" |
| 24 | + ## @param cluster_name - string - optional - default: clickhouse |
| 25 | + ## Friendly name for this ClickHouse Cloud service. |
| 26 | + ## Used as the "service" field on every Datadog log entry, making it easy |
| 27 | + ## to filter logs by cluster in the Datadog Logs Explorer. |
| 28 | + # |
| 29 | + # cluster_name: clickhouse |
26 | 30 |
|
| 31 | + ## @param collect_query_logs - boolean - optional - default: true |
| 32 | + ## Enable collection of query logs from system.query_log. |
| 33 | + ## Captures completed queries and exceptions with duration, memory, and row stats. |
| 34 | + # |
| 35 | + # collect_query_logs: true |
| 36 | + |
| 37 | + ## @param collect_text_logs - boolean - optional - default: true |
| 38 | + ## Enable collection of server logs from system.text_log. |
| 39 | + ## Captures Error, Warning, and Fatal level server-side log entries. |
| 40 | + # |
| 41 | + # collect_text_logs: true |
| 42 | + |
| 43 | + ## @param log_batch_size - integer - optional - default: 1000 |
| 44 | + ## Maximum number of log rows fetched per check run, per table. |
| 45 | + ## Range: 1–10000. Higher values reduce API calls but increase memory usage. |
| 46 | + # |
| 47 | + # log_batch_size: 1000 |
| 48 | + |
| 49 | + ## @param slow_query_threshold_ms - integer - optional - default: 5000 |
| 50 | + ## Queries slower than this threshold (in milliseconds) are tagged with |
| 51 | + ## status "warning" instead of "info" in Datadog Logs. |
| 52 | + ## Range: 0–3600000. Set to 0 to disable slow-query highlighting. |
| 53 | + # |
| 54 | + # slow_query_threshold_ms: 5000 |
| 55 | + |
| 56 | + ## @param initial_backfill_minutes - integer - optional - default: 60 |
| 57 | + ## How far back (in minutes) to look on the very first check run when |
| 58 | + ## no cursor exists yet. Subsequent runs resume from the last cursor. |
| 59 | + ## Range: 1–1440 (up to 24 hours). |
| 60 | + # |
| 61 | + # initial_backfill_minutes: 60 |
| 62 | + |
| 63 | + ## @param query_timeout_seconds - integer - optional - default: 30 |
| 64 | + ## HTTP timeout in seconds for each ClickHouse Cloud Query API request. |
| 65 | + ## Range: 5–300. Increase if you see timeout errors with large batch sizes. |
| 66 | + # |
| 67 | + # query_timeout_seconds: 30 |
| 68 | + |
| 69 | + ## @param tags - list of strings - optional |
| 70 | + ## List of tags to attach to every log entry emitted by this check. |
| 71 | + ## |
| 72 | + ## Learn more about tagging: https://docs.datadoghq.com/tagging/ |
| 73 | + # |
| 74 | + # tags: |
| 75 | + # - "env:prod" |
| 76 | + # - "clickhouse_cluster:<your-cluster-name>" |
| 77 | + |
| 78 | +## Log section (required for send_log() to work) |
| 79 | +## |
| 80 | +## The Datadog Agent's log launcher needs this block to open a file handle |
| 81 | +## for the integration. Without it, send_log() silently fails with: |
| 82 | +## "Failed to write log to file, file is nil for integration ID: clickhouse_cloud" |
| 83 | +## |
| 84 | +## Do not remove or comment out this section. |
| 85 | +# |
27 | 86 | logs: |
28 | 87 | - type: integration |
29 | 88 | source: clickhouse |
30 | | - |
|
0 commit comments