From bffd57aa5860ed49fcf33fc8093efa10eaa5f415 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Wed, 4 Mar 2020 14:42:50 -0800 Subject: [PATCH] Update readme and changelog --- .gitignore | 2 +- CHANGELOG.md | 3 +- README.md | 1 + plugins/inputs/clickhouse/README.md | 33 +++++++++++-------- plugins/inputs/clickhouse/clickhouse.go | 8 ++--- .../inputs/clickhouse/dev/docker-compose.yml | 2 +- .../inputs/clickhouse/dev/tls_settings.xml | 2 +- 7 files changed, 29 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 0ae500592..4176a0413 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ /telegraf /telegraf.exe /telegraf.gz -/vendor \ No newline at end of file +/vendor diff --git a/CHANGELOG.md b/CHANGELOG.md index 0540debfa..b25ad4241 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,11 @@ #### New Inputs +- [clickhouse](/plugins/inputs/clickhouse/README.md) - Contributed by @kshvakov +- [execd](/plugins/inputs/execd/README.md) - Contributed by @jgraichen - [infiniband](/plugins/inputs/infiniband/README.md) - Contributed by @willfurnell - [modbus](/plugins/inputs/modbus/README.md) - Contributed by @garciaolais - [monit](/plugins/inputs/monit/README.md) - Contributed by @SirishaGopigiri -- [execd](/plugins/inputs/execd/README.md) - Contributed by @jgraichen #### New Processors diff --git a/README.md b/README.md index 49a4a456e..d864c5385 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,7 @@ For documentation on the latest development code see the [documentation index][d * [chrony](./plugins/inputs/chrony) * [cisco_telemetry_gnmi](./plugins/inputs/cisco_telemetry_gnmi) * [cisco_telemetry_mdt](./plugins/inputs/cisco_telemetry_mdt) +* [clickhouse](./plugins/inputs/clickhouse) * [cloud_pubsub](./plugins/inputs/cloud_pubsub) Google Cloud Pub/Sub * [cloud_pubsub_push](./plugins/inputs/cloud_pubsub_push) Google Cloud Pub/Sub push endpoint * [conntrack](./plugins/inputs/conntrack) diff --git a/plugins/inputs/clickhouse/README.md b/plugins/inputs/clickhouse/README.md index 8eb478fbc..fbd182287 100644 --- a/plugins/inputs/clickhouse/README.md +++ b/plugins/inputs/clickhouse/README.md @@ -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 -```ini +```toml # Read metrics from one or many ClickHouse servers [[inputs.clickhouse]] ## Username for authorization on ClickHouse server ## example: user = "default" user = "default" - + ## Password for authorization on ClickHouse server ## 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. ## example: timeout = 1s - # timeout = 5s + # timeout = 5s ## List of servers for metrics scraping ## metrics scrape via HTTP(s) clickhouse interface @@ -54,7 +54,7 @@ This plugin gathers the statistic data from [ClickHouse](https://github.com/Clic ## ## ## - ## + ## ## example: cluster_include = ["my-own-cluster"] # cluster_include = [] @@ -71,22 +71,23 @@ This plugin gathers the statistic data from [ClickHouse](https://github.com/Clic # insecure_skip_verify = false ``` -### Metrics: +### Metrics + - clickhouse_events - tags: - hostname (ClickHouse server hostname) - cluster (Name of the cluster [optional]) - shard_num (Shard number in the cluster [optional]) - 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: - hostname (ClickHouse server hostname) - cluster (Name of the cluster [optional]) - shard_num (Shard number in the cluster [optional]) - 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 - tags: @@ -94,9 +95,9 @@ This plugin gathers the statistic data from [ClickHouse](https://github.com/Clic - cluster (Name of the cluster [optional]) - shard_num (Shard number in the cluster [optional]) - 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: - hostname (ClickHouse server hostname) - 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_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 -``` \ No newline at end of file +``` + +[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 diff --git a/plugins/inputs/clickhouse/clickhouse.go b/plugins/inputs/clickhouse/clickhouse.go index c122af4df..dcfc74ad6 100644 --- a/plugins/inputs/clickhouse/clickhouse.go +++ b/plugins/inputs/clickhouse/clickhouse.go @@ -25,14 +25,14 @@ var sampleConfig = ` ## Username for authorization on ClickHouse server ## example: user = "default"" user = "default" - + ## Password for authorization on ClickHouse server ## 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. ## example: timeout = 1s - # timeout = 5s + # timeout = 5s ## List of servers for metrics scraping ## metrics scrape via HTTP(s) clickhouse interface @@ -70,7 +70,7 @@ var sampleConfig = ` ## ## ## - ## + ## ## example: cluster_include = ["my-own-cluster"] # cluster_include = [] diff --git a/plugins/inputs/clickhouse/dev/docker-compose.yml b/plugins/inputs/clickhouse/dev/docker-compose.yml index a8b22c34d..4dd4d1846 100644 --- a/plugins/inputs/clickhouse/dev/docker-compose.yml +++ b/plugins/inputs/clickhouse/dev/docker-compose.yml @@ -13,4 +13,4 @@ services: - 8123:8123 - 8443:8443 - 9000:9000 - - 9009:9009 \ No newline at end of file + - 9009:9009 diff --git a/plugins/inputs/clickhouse/dev/tls_settings.xml b/plugins/inputs/clickhouse/dev/tls_settings.xml index cf6716b82..6268b6a12 100644 --- a/plugins/inputs/clickhouse/dev/tls_settings.xml +++ b/plugins/inputs/clickhouse/dev/tls_settings.xml @@ -1,4 +1,4 @@ 8443 9440 - \ No newline at end of file +