Ubuntu 22.04.4
Telegraf 1.29.4
influxdb2 2.7.5
Hepl, how do I transfer the metrics of all databases (db “flow”)?
By default, the metrics of two databases are transmitted: default and system.
Thanks.
SHOW databases;
name |
------------------+
INFORMATION_SCHEMA|
default |
flow |
information_schema|
system |
Metrics in db:

Config Telegraf
# Global Agent Configuration
[agent]
hostname = "host-01"
flush_interval = "60s"
interval = "60s"
debug = true
quiet = false
logtarget = "file"
logfile = "/var/log/telegraf/telegraf.log"
logfile_rotation_max_size = "1MB"
# Input Plugins
[[inputs.clickhouse]]
username = "monitor"
password = "passwd"
auto_discovery = false
servers = ["http://127.0.0.1:8123"]
[[outputs.influxdb_v2]]
urls = ["http://10.0.0.1:8086"]
token = "token"
organization = "org"
bucket = "bucket"
Hi,
The clickhouse input plugin gathers metrics about clickhouse. It is not for exporting data out of clickhouse.
My suggestion is to determine the best way to export the data from ClickHouse using a file format and then reading those files with the InfluxDB client libraries to parse and send the data to InfluxDB.
Telegraf can read files and parse metrics from them, but it is not ideally suited to a very large bulk import.
Thanks a lot.
I want to collect metrics about clickhouse, or rather about all the metrics from all its databases.
I created a new database “flow” and want to get metrics about its usage, but it’s not in the telegraf metrics output.
I don’t use telegraf to input and output data from the “flow” database. Оther processes do this.
Thanks for clarifying.
Look at the plugin readme it looks like only the clickhouse_tables
metric creates database specific information. It seems to run this query.
Have you created anything in that database? If you run the above query manually do get anything?
1 Like
Very ashamed.
Tables from the new database were not included in the metrics, since there was no data in it.
Thank you.
1 Like
No worries! Glad you figured it out!
1 Like