59 lines
1.8 KiB
Plaintext
59 lines
1.8 KiB
Plaintext
# Save metrics to an SQL Database
|
|
[[outputs.clickhouse]]
|
|
## Data source name
|
|
data_source_name = ""
|
|
|
|
## Initialization SQL
|
|
# init_sql = ""
|
|
|
|
## Timestamp column name
|
|
# timestamp_column = "timestamp"
|
|
|
|
## Default TTL for data in the table (use ClickHouse syntax)
|
|
ttl = "3 MONTH"
|
|
|
|
## Table operation mode
|
|
## Set to "single" to create a single table for all metrics.
|
|
## Set to "multi" to create a new table for each metric.
|
|
# table_mode = "multi"
|
|
|
|
## Single table configuration
|
|
# [outputs.clickhouse.single_table]
|
|
## Table name
|
|
# table_name = "telegraf"
|
|
|
|
## Multi table configuration
|
|
# [outputs.clickhouse.multi_table]
|
|
## Table name prefix
|
|
# table_prefix = "telegraf"
|
|
|
|
## Initial metric queue size
|
|
## Queue resizes automatically if the queue becomes too large.
|
|
# queue_initial_size = 100000
|
|
|
|
## Maximum queue size, 0 means unlimited
|
|
## If the queue reaches this size, new writes will be dropped until it drains.
|
|
# queue_max_size = 0
|
|
|
|
## Queue flush size, 0 means unlimited
|
|
## The flush interval will not be reset if the queue is larger than this.
|
|
# queue_flush_size = 0
|
|
|
|
## Flush interval for the metric queue
|
|
## The agent waits until N seconds have passed without any writes before flushing metrics to ClickHouse.
|
|
# queue_flush_interval = "1"
|
|
|
|
## Maximum amount of time a connection may be idle. "0s" means connections are
|
|
## never closed due to idle time.
|
|
# connection_max_idle_time = "0s"
|
|
|
|
## Maximum amount of time a connection may be reused. "0s" means connections
|
|
## are never closed due to age.
|
|
# connection_max_lifetime = "0s"
|
|
|
|
## Maximum number of connections in the idle connection pool. 0 means unlimited.
|
|
# connection_max_idle = 2
|
|
|
|
## Maximum number of open connections to the database. 0 means unlimited.
|
|
# connection_max_open = 0
|