|
|
@ -1,22 +1,22 @@
|
|
|
|
# Telegraf Input Plugin: ClickHouse
|
|
|
|
# ClickHouse Input Plugin
|
|
|
|
|
|
|
|
|
|
|
|
This plugin gathers the statistic data from [ClickHouse](https://github.com/ClickHouse/ClickHouse) server.
|
|
|
|
This plugin gathers the statistic data from [ClickHouse](https://github.com/ClickHouse/ClickHouse) server.
|
|
|
|
|
|
|
|
|
|
|
|
### Configuration
|
|
|
|
### Configuration
|
|
|
|
```ini
|
|
|
|
```toml
|
|
|
|
# Read metrics from one or many ClickHouse servers
|
|
|
|
# Read metrics from one or many ClickHouse servers
|
|
|
|
[[inputs.clickhouse]]
|
|
|
|
[[inputs.clickhouse]]
|
|
|
|
## Username for authorization on ClickHouse server
|
|
|
|
## Username for authorization on ClickHouse server
|
|
|
|
## example: user = "default"
|
|
|
|
## example: user = "default"
|
|
|
|
user = "default"
|
|
|
|
user = "default"
|
|
|
|
|
|
|
|
|
|
|
|
## Password for authorization on ClickHouse server
|
|
|
|
## Password for authorization on ClickHouse server
|
|
|
|
## example: password = "super_secret"
|
|
|
|
## example: password = "super_secret"
|
|
|
|
|
|
|
|
|
|
|
|
## HTTP(s) timeout while getting metrics values
|
|
|
|
## HTTP(s) timeout while getting metrics values
|
|
|
|
## The timeout includes connection time, any redirects, and reading the response body.
|
|
|
|
## The timeout includes connection time, any redirects, and reading the response body.
|
|
|
|
## example: timeout = 1s
|
|
|
|
## example: timeout = 1s
|
|
|
|
# timeout = 5s
|
|
|
|
# timeout = 5s
|
|
|
|
|
|
|
|
|
|
|
|
## List of servers for metrics scraping
|
|
|
|
## List of servers for metrics scraping
|
|
|
|
## metrics scrape via HTTP(s) clickhouse interface
|
|
|
|
## metrics scrape via HTTP(s) clickhouse interface
|
|
|
@ -54,7 +54,7 @@ This plugin gathers the statistic data from [ClickHouse](https://github.com/Clic
|
|
|
|
## </remote_servers>
|
|
|
|
## </remote_servers>
|
|
|
|
##
|
|
|
|
##
|
|
|
|
## </yandex>
|
|
|
|
## </yandex>
|
|
|
|
##
|
|
|
|
##
|
|
|
|
## example: cluster_include = ["my-own-cluster"]
|
|
|
|
## example: cluster_include = ["my-own-cluster"]
|
|
|
|
# cluster_include = []
|
|
|
|
# cluster_include = []
|
|
|
|
|
|
|
|
|
|
|
@ -71,22 +71,23 @@ This plugin gathers the statistic data from [ClickHouse](https://github.com/Clic
|
|
|
|
# insecure_skip_verify = false
|
|
|
|
# insecure_skip_verify = false
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Metrics:
|
|
|
|
### Metrics
|
|
|
|
|
|
|
|
|
|
|
|
- clickhouse_events
|
|
|
|
- clickhouse_events
|
|
|
|
- tags:
|
|
|
|
- tags:
|
|
|
|
- hostname (ClickHouse server hostname)
|
|
|
|
- hostname (ClickHouse server hostname)
|
|
|
|
- cluster (Name of the cluster [optional])
|
|
|
|
- cluster (Name of the cluster [optional])
|
|
|
|
- shard_num (Shard number in the cluster [optional])
|
|
|
|
- shard_num (Shard number in the cluster [optional])
|
|
|
|
- fields:
|
|
|
|
- fields:
|
|
|
|
- all rows from system.events, all metrics is COUNTER type, look https://clickhouse.tech/docs/en/operations/system_tables/#system_tables-events
|
|
|
|
- all rows from [system.events][]
|
|
|
|
|
|
|
|
|
|
|
|
- clickhouse_metrics
|
|
|
|
+ clickhouse_metrics
|
|
|
|
- tags:
|
|
|
|
- tags:
|
|
|
|
- hostname (ClickHouse server hostname)
|
|
|
|
- hostname (ClickHouse server hostname)
|
|
|
|
- cluster (Name of the cluster [optional])
|
|
|
|
- cluster (Name of the cluster [optional])
|
|
|
|
- shard_num (Shard number in the cluster [optional])
|
|
|
|
- shard_num (Shard number in the cluster [optional])
|
|
|
|
- fields:
|
|
|
|
- fields:
|
|
|
|
- all rows from system.metrics, all metrics is GAUGE type, look https://clickhouse.tech/docs/en/operations/system_tables/#system_tables-metrics
|
|
|
|
- all rows from [system.metrics][]
|
|
|
|
|
|
|
|
|
|
|
|
- clickhouse_asynchronous_metrics
|
|
|
|
- clickhouse_asynchronous_metrics
|
|
|
|
- tags:
|
|
|
|
- tags:
|
|
|
@ -94,9 +95,9 @@ This plugin gathers the statistic data from [ClickHouse](https://github.com/Clic
|
|
|
|
- cluster (Name of the cluster [optional])
|
|
|
|
- cluster (Name of the cluster [optional])
|
|
|
|
- shard_num (Shard number in the cluster [optional])
|
|
|
|
- shard_num (Shard number in the cluster [optional])
|
|
|
|
- fields:
|
|
|
|
- fields:
|
|
|
|
- all rows from system.asynchronous_metrics, all metrics is GAUGE type, look https://clickhouse.tech/docs/en/operations/system_tables/#system_tables-asynchronous_metrics
|
|
|
|
- all rows from [system.asynchronous_metrics][]
|
|
|
|
|
|
|
|
|
|
|
|
- clickhouse_tables
|
|
|
|
+ clickhouse_tables
|
|
|
|
- tags:
|
|
|
|
- tags:
|
|
|
|
- hostname (ClickHouse server hostname)
|
|
|
|
- hostname (ClickHouse server hostname)
|
|
|
|
- table
|
|
|
|
- table
|
|
|
@ -116,4 +117,8 @@ clickhouse_asynchronous_metrics,cluster=test_cluster_two_shards_localhost,host=k
|
|
|
|
clickhouse_metrics,cluster=test_cluster_two_shards_localhost,host=kshvakov,hostname=localhost,shard_num=1 replicated_send=0i,write=0i,ephemeral_node=0i,zoo_keeper_request=0i,distributed_files_to_insert=0i,replicated_fetch=0i,background_schedule_pool_task=0i,interserver_connection=0i,leader_replica=0i,delayed_inserts=0i,global_thread_active=41i,merge=0i,readonly_replica=0i,memory_tracking_in_background_schedule_pool=0i,memory_tracking_for_merges=0i,zoo_keeper_session=0i,context_lock_wait=0i,storage_buffer_bytes=0i,background_pool_task=0i,send_external_tables=0i,zoo_keeper_watch=0i,part_mutation=0i,disk_space_reserved_for_merge=0i,distributed_send=0i,version_integer=19014003i,local_thread=0i,replicated_checks=0i,memory_tracking=0i,memory_tracking_in_background_processing_pool=0i,leader_election=0i,revision=54425i,open_file_for_read=0i,open_file_for_write=0i,storage_buffer_rows=0i,rw_lock_waiting_readers=0i,rw_lock_waiting_writers=0i,rw_lock_active_writers=0i,local_thread_active=0i,query_preempted=0i,tcp_connection=1i,http_connection=1i,read=2i,query_thread=0i,dict_cache_requests=0i,rw_lock_active_readers=1i,global_thread=43i,query=1i 1569421000000000000
|
|
|
|
clickhouse_metrics,cluster=test_cluster_two_shards_localhost,host=kshvakov,hostname=localhost,shard_num=1 replicated_send=0i,write=0i,ephemeral_node=0i,zoo_keeper_request=0i,distributed_files_to_insert=0i,replicated_fetch=0i,background_schedule_pool_task=0i,interserver_connection=0i,leader_replica=0i,delayed_inserts=0i,global_thread_active=41i,merge=0i,readonly_replica=0i,memory_tracking_in_background_schedule_pool=0i,memory_tracking_for_merges=0i,zoo_keeper_session=0i,context_lock_wait=0i,storage_buffer_bytes=0i,background_pool_task=0i,send_external_tables=0i,zoo_keeper_watch=0i,part_mutation=0i,disk_space_reserved_for_merge=0i,distributed_send=0i,version_integer=19014003i,local_thread=0i,replicated_checks=0i,memory_tracking=0i,memory_tracking_in_background_processing_pool=0i,leader_election=0i,revision=54425i,open_file_for_read=0i,open_file_for_write=0i,storage_buffer_rows=0i,rw_lock_waiting_readers=0i,rw_lock_waiting_writers=0i,rw_lock_active_writers=0i,local_thread_active=0i,query_preempted=0i,tcp_connection=1i,http_connection=1i,read=2i,query_thread=0i,dict_cache_requests=0i,rw_lock_active_readers=1i,global_thread=43i,query=1i 1569421000000000000
|
|
|
|
clickhouse_tables,cluster=test_cluster_two_shards_localhost,database=system,host=kshvakov,hostname=localhost,shard_num=1,table=trace_log bytes=754i,parts=1i,rows=1i 1569421000000000000
|
|
|
|
clickhouse_tables,cluster=test_cluster_two_shards_localhost,database=system,host=kshvakov,hostname=localhost,shard_num=1,table=trace_log bytes=754i,parts=1i,rows=1i 1569421000000000000
|
|
|
|
clickhouse_tables,cluster=test_cluster_two_shards_localhost,database=default,host=kshvakov,hostname=localhost,shard_num=1,table=example bytes=326i,parts=2i,rows=2i 1569421000000000000
|
|
|
|
clickhouse_tables,cluster=test_cluster_two_shards_localhost,database=default,host=kshvakov,hostname=localhost,shard_num=1,table=example bytes=326i,parts=2i,rows=2i 1569421000000000000
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[system.events]: https://clickhouse.tech/docs/en/operations/system_tables/#system_tables-events
|
|
|
|
|
|
|
|
[system.metrics]: https://clickhouse.tech/docs/en/operations/system_tables/#system_tables-metrics
|
|
|
|
|
|
|
|
[system.asynchronous_metrics]: https://clickhouse.tech/docs/en/operations/system_tables/#system_tables-asynchronous_metrics
|
|
|
|