Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 7.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'mfedotov-carbon_clickhouse', '1.0.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-carbon_clickhouse
Table of Contents
- puppet-carbon_clickhouse
- [Table of Contents](#table-of-contents)
Description
The carbon_clickhouse module installs, configures and manages the carbon-clickhouse service.
Setup
Setup Requirements
This module requires toml gem, which is used to translate Hash configuration to carbon-clickhouse toml format configuration files. To install it you need to execute following command on your puppetmaster server:
sudo puppetserver gem install toml
Beginning with carbon_clickhouse
To install a carbon-clickhouse with the default options:
include 'carbon_clickhouse'
To customize carbon-clickhouse configuration, you must also pass in an override hash:
class { 'carbon_clickhouse':
override_config => {
'data' => {
'path' => '/mnt/data/graphite/carbon-clickhouse'
}
}
}
If you want to customize clickhouse upload conguration, use upload_config
option:
class { 'carbon_clickhouse':
upload_config => {
'upload.graphite_reverse' => {
'type' => 'points-reverse',
'table' => 'graphite.graphite_reverse',
'threads' => 1,
'url' => "http://graphite:${clickhouse_graphite_password}@localhost:8123",
'timeout' => '1m0s',
},
'upload.graphite_index' => {
'type' => 'index',
'table' => 'graphite.graphite_index',
'threads' => 1,
'url' => "http://graphite:${clickhouse_graphite_password}@localhost:8123",
'timeout' => '1m0s',
'cache-ttl' => '12h0m0s',
},
'upload.graphite_tagged' => {
'type' => 'tagged',
'table' => 'graphite.graphite_tagged',
'threads' => 1,
'url' => "http://graphite:${clickhouse_graphite_password}@localhost:8123",
'timeout' => '1m0s',
'cache-ttl' => '12h0m0s',
}
}
}
Reference
Classes
Public Classes
carbon_clickhouse
: Installs and configures carbon-clickhouse.
Private Classes
carbon_clickhouse::config
: Private class for carbon-clickhouse configuration.carbon_clickhouse::install
: Private class for managing carbon-clickhouse package.carbon_clickhouse::params
: Private class for setting default carbon-clickhouse parameters.carbon_clickhouse::service
: Private class for managing the carbon-clickhouse service.
Functions
carbon_clickhouse_config
: Convert hash to carbon-clickhouse TOML config.
Limitations
For a list of supported operating systems, see metadata.json
Development
Please feel free to fork, modify, create issues, bug reports and pull requests.
Reference
Table of Contents
Classes
Public Classes
carbon_clickhouse
: Installs and configures carbon-clickhouse.
Private Classes
carbon_clickhouse::config
: Private class for carbon-clickhouse configuration.carbon_clickhouse::install
: Private class for managing carbon-clickhouse package.carbon_clickhouse::params
: Private class for setting default carbon-clickhouse parameters.carbon_clickhouse::service
: Private class for managing the carbon-clickhouse service.
Functions
carbon_clickhouse_config
: Convert hash to carbon-clickhouse TOML config.
Classes
carbon_clickhouse
Installs and configures carbon-clickhouse.
Examples
Install carbon-clickhouse.
class { 'carbon_clickhouse':
package_name => 'carbon-clickhouse',
user => 'carbon',
group => 'carbon',
}
Parameters
The following parameters are available in the carbon_clickhouse
class.
package_name
Data type: String
Name of carbon-clickhouse package to install. Defaults to 'carbon-clickhouse'.
Default value: $carbon_clickhouse::params::package_name
package_ensure
Data type: String
Whether the carbon-clickhouse package should be present, absent or specific version. Valid values are 'present', 'absent' or 'x.y.z'. Defaults to 'present'.
Default value: $carbon_clickhouse::params::package_ensure
manage_package
Data type: Boolean
Whether to manage carbon-clickhouse package. Defaults to 'true'.
Default value: $carbon_clickhouse::params::manage_package
package_install_options
Data type: Array[String]
Array of install options for managed package resources. Appropriate options are passed to package manager.
Default value: $carbon_clickhouse::params::package_install_options
manage_config
Data type: Boolean
Whether the carbon-clickhouse configurations files should be managed. Defaults to 'true'.
Default value: $carbon_clickhouse::params::manage_config
config_dir
Data type: Stdlib::Unixpath
Directory where carbon-clickhouse configuration files will be stored. Defaults to '/etc/carbon-clickhouse'.
Default value: $carbon_clickhouse::params::config_dir
config_file
Data type: String
Name of the file, where carbon-clickhouse configuration will be stored. Defaults to 'carbon-clickhouse.conf'.
Default value: $carbon_clickhouse::params::config_file
user
Data type: String
Owner for carbon-clickhouse configuration and data directories. Defaults to 'carbon-clickhouse'.
Default value: $carbon_clickhouse::params::user
group
Data type: String
Group for carbon-clickhouse configuration and data directories. Defaults to 'carbon-clickhouse'.
Default value: $carbon_clickhouse::params::group
override_config
Data type: Optional[Hash[String, Any]]
Hash[String, Any] of override configuration options to pass to carbon-clickhouse configuration file.
Default value: {}
upload_config
Data type: Hash[String, Any]
Hash[String, Any] of Clickhouse upload configuration options to pass to carbon-clickhouse configuration file.
Default value: $carbon_clickhouse::params::upload_config
service_name
Data type: String
Name of the carbon-clickhouse service. Defaults to 'carbon-clickhouse'.
Default value: $carbon_clickhouse::params::service_name
service_ensure
Data type: Stdlib::Ensure::Service
Specifies whether carbon-clickhouse service should be running. Defaults to 'running'.
Default value: $carbon_clickhouse::params::service_ensure
service_enabled
Data type: Boolean
Specifies whether carbon-clickhouse service should be enabled. Defaults to 'true'.
Default value: $carbon_clickhouse::params::service_enabled
manage_service
Data type: Boolean
Specifies whether carbon-clickhouse service should be managed. Defaults to 'true'.
Default value: $carbon_clickhouse::params::manage_service
restart
Data type: Boolean
Specifies whether carbon-clickhouse service should be restated when configuration changes. Defaults to 'true'.
Default value: $carbon_clickhouse::params::restart
enable_logrotate
Data type: Boolean
Specifies whether logrotate rules should be creatd for carbon-clickhouse logs. Defaults to 'true'.
Default value: $carbon_clickhouse::params::enable_logrotate
Functions
carbon_clickhouse_config
Type: Ruby 3.x API
Convert hash to carbon-clickhouse TOML config.
carbon_clickhouse_config(Hash $Settings)
The carbon_clickhouse_config function.
Returns: Toml
carbon-clickhouse configuration content.
Dependencies
- puppetlabs-stdlib (>= 4.20.0 < 5.2.0)
- puppetlabs-apt (>= 2.1.0 < 7.0.0)
- camptocamp-systemd (>= 0.2.2)
- puppet-logrotate (>= 3.4.1-rc0)