Open sdejong629 opened 2 months ago
Pinging code owners:
exporter/clickhouse: @hanjm @dmitryax @Frapschen @SpencerTorres
See Adding Labels via Comments if you do not have permissions to add labels yourself.
Looks goods to add new config field support extra setting. hi, @SpencerTorres what is your ideal and could have time to implement it?
ClickHouse has a lot of options when configuring a table, too many for us to reasonably keep up with and add to the exporter config.
Instead, I recommend using the new create_schema: false
option in the config and manually creating the required tables yourself. In a production environment, it's not good to rely on multiple instances of the exporter racing to auto-create the schema.
When you set create_schema
to false
, it will not create the tables for you. This lets you create the tables manually and have full control over the schema/settings. It also lets you know WHEN the table is created, instead of questioning whether the exporter did it.
If you need an example of what DDL the exporter would run, you can check the default_ddl/
folder. (This is a permalink, be sure to use the the version that matches your exporter.)
Component(s)
exporter/clickhouse
Is your feature request related to a problem? Please describe.
The exporter creates a new database and table, but when a specific storage policy is required for the table, this can not be set on table creation by the exporter.
Describe the solution you'd like
Add an option in de clickhouse_exporter config for allowing to set a custom storage policy on table create
Describe alternatives you've considered
It can be set afterwards in clickhouse, but this requires you to include the current storage policy and move data to the new storage before disabling the 'old' storage policy
Additional context
See the final SETTINGS line for table creation