Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x
- Puppet >= 6.1.0 < 8.0.0
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'maeq-thanos', '1.6.0'
Learn more about managing modules with a PuppetfileDocumentation
maeq-thanos
Table of Contents
Description
This module automates the install of Thanos and it's components into a service.
Maximum tested version of Thanos : 0.26.0
Usage
For more information see REFERENCE.md.
Install Thanos
Puppet
class { 'thanos':
version => '0.26.0'
}
Hiera Data
include thanos
thanos::version: '0.26.0'
Thanos Sidecar
thanos::manage_sidecar: true
Thanos Query
thanos::manage_query: true
thanos::query::endpoints:
- 'sidecar:10901'
- 'store:10901'
Thanos Query Frontend
thanos::manage_query_frontend: true
Thanos Rule
thanos::manage_rule: true
thanos::rule::queries:
- 'query:10901'
Thanos Store
thanos::manage_store: true
Thanos Compact
thanos::manage_compact: true
Thanos Receive
thanos::manage_receive: true
Thanos Tools Bucket Web
thanos::manage_tools_bucket_web: true
Manage Storage config
For more configuration information see Thanos Storage configuration page.
Puppet
thanos::storage { '/etc/thanos/storage.yaml':
ensure => 'present',
type => 'FILESYSTEM',
config => {
directory => '/data'
}
}
Yaml
include thanos
thanos::manage_storage_config: true
thanos::storage_config_file: '/etc/thanos/storage.yaml'
thanos::storage_config:
ensure: 'present'
type: 'FILESYSTEM'
config:
directory: '/data'
Manage Tracing config
For more configuration information see Thanos Tracing configuration page.
Puppet
thanos::tracing { '/etc/thanos/tracing.yaml':
ensure => 'present',
type => 'JAEGER',
config => {
service_name => '',
disabled => false,
rpc_metrics => false,
tags => '',
sampler_type => '',
sampler_param => 0,
sampler_manager_host_port => '',
sampler_max_operations => 0,
sampler_refresh_interval => '0s',
reporter_max_queue_size => 0,
reporter_flush_interval => '0s',
reporter_log_spans => false,
endpoint => '',
user => '',
password => '',
agent_host => '',
agent_port => 0,
}
}
Yaml
include thanos
thanos::manage_tracing_config: true
thanos::tracing_config_file: '/etc/thanos/tracing.yaml'
thanos::tracing_config:
ensure: 'present'
type: 'JAEGER'
config:
service_name: ''
disabled: false
rpc_metrics: false
tags: ''
sampler_type: ''
sampler_param: 0
sampler_manager_host_port: ''
sampler_max_operations: 0
sampler_refresh_interval: '0s'
reporter_max_queue_size: 0
reporter_flush_interval: '0s'
reporter_log_spans: false
endpoint: ''
user: ''
password: ''
agent_host: ''
agent_port: 0
Examples
Install from other source
thanos::base_url: 'http://my_private_dropbox/thanos'
Or
thanos::download_url: 'http://my_private_dropbox/thanos/thanos-0.10.1.tar.gz'
Install all in one
It's not a very good idea to deploy like this in Production. But it's possible to test it on the same machine.
thanos::manage_sidecar: true
thanos::manage_query: true
thanos::manage_rule: true
thanos::manage_store: true
thanos::manage_compact: true
thanos::sidecar::http_address: '0.0.0.0:10902'
thanos::sidecar::grpc_address: '0.0.0.0:10901'
thanos::sidecar::objstore_config_file: '/etc/thanos/storage.yaml'
thanos::query::http_address: '0.0.0.0:10904'
thanos::query::grpc_address: '0.0.0.0:10903'
thanos::query::endpoints:
- 'localhost:10901'
- 'localhost:10907'
thanos::rule::http_address: '0.0.0.0:10906'
thanos::rule::grpc_address: '0.0.0.0:10905'
thanos::rule::queries:
- 'localhost:10903'
thanos::store::http_address: '0.0.0.0:10908'
thanos::store::grpc_address: '0.0.0.0:10907'
thanos::compact::http_address: '0.0.0.0:10910'
thanos::compact::grpc_address: '0.0.0.0:10909'
thanos::manage_storage_config: true
thanos::storage_config_file: '/etc/thanos/storage.yaml'
thanos::storage_config:
ensure: 'present'
type: 'FILESYSTEM'
config:
directory: '/data'
Sidecar with Prometheus
I recommend to use the module puppet-prometheus, it is very easy to use.
include prometheus
include thanos
prometheus::manage_prometheus_server: true
prometheus::config_dir: '/etc/prometheus'
prometheus::configname: 'prometheus.yaml'
prometheus::localstorage: '/data/prometheus'
prometheus::extra_options: '--web.enable-lifecycle --storage.tsdb.min-block-duration=2h --storage.tsdb.max-block-duration=2h'
thanos::manage_sidecar: true
thanos::tsdb_path: '/data/prometheus'
thanos::reloader_config_file: '/etc/prometheus/prometheus.yaml'
Limitations
Only support, Thanos supported OS. See Thanos releases page
Development
See Contributing.
This project contains tests for rspec-puppet.
Quickstart to run all linter and unit tests:
bundle install
bundle exec rake validate
Or
pdk validate
pdk test unit
Reference
Table of Contents
Classes
thanos
: This module manages Thanosthanos::compact
: This class manages compact servicethanos::config
: This class manages configuration filesthanos::install
: This class install Thanos requirements and binaries.thanos::query
: This class manages query servicethanos::query_frontend
: This class manages query frontend servicethanos::receive
: This class manages receiver servicethanos::rule
: This class manages rule servicethanos::sidecar
: This class manages sidecar servicethanos::store
: This class manages store servicethanos::tools::bucket_web
: This class manages bucket web interface service
Defined types
thanos::config::index_cache
: Manage Index cache configuration file.thanos::config::storage
: Manage Storage configuration file.thanos::config::tracing
: Manage Tracing configuration file.thanos::resources::service
: This defined type create component's service.
Data types
Thanos::Index_cache_type
: Thanos index cache typeThanos::Log_level
: Thanos Log Level typeThanos::Storage_type
: Thanos Storage typeThanos::Tracing_type
: Thanos Tracing type
Classes
thanos
Init class of Thanos module. It can installes Thanos binaries and manages components as single Service.
Examples
include thanos
Parameters
The following parameters are available in the thanos
class:
version
os
manage_sidecar
manage_query
manage_query_frontend
manage_rule
manage_store
manage_compact
manage_receive
manage_tools_bucket_web
install_method
package_ensure
package_name
base_url
download_extension
download_url
base_dir
bin_dir
config_dir
purge_config_dir
tsdb_path
manage_user
manage_group
user
group
usershell
extra_groups
extract_command
manage_storage_config
storage_config_file
storage_config
manage_tracing_config
tracing_config_file
tracing_config
manage_index_cache_config
index_cache_config_file
index_cache_config
version
Data type: Pattern[/\d+\.\d+\.\d+/]
Thanos release. See https://github.com/thanos-io/thanos/releases
os
Data type: String
Operating system.
Default value: downcase($facts['kernel'])
manage_sidecar
Data type: Boolean
Whether to create a service to run Sidecar.
Default value: false
manage_query
Data type: Boolean
Whether to create a service to run Query.
Default value: false
manage_query_frontend
Data type: Boolean
Whether to create a service to run Query Frontend.
Default value: false
manage_rule
Data type: Boolean
Whether to create a service to run Rule.
Default value: false
manage_store
Data type: Boolean
Whether to create a service to run Store.
Default value: false
manage_compact
Data type: Boolean
Whether to create a service to run Compact.
Default value: false
manage_receive
Data type: Boolean
Whether to create a service to run Receiver.
Default value: false
manage_tools_bucket_web
Data type: Boolean
Whether to create a service to run Bucket Web interface.
Default value: false
install_method
Data type: Enum['url', 'package', 'none']
Installation method: url or package (only url is supported currently).
Default value: 'url'
package_ensure
Data type: Enum['present', 'absent', 'latest']
If package, then use this for package ensure default 'latest'.
Default value: 'latest'
package_name
Data type: String
Thanos package name - not available yet.
Default value: 'thanos'
base_url
Data type: Stdlib::HTTPUrl
Base URL for thanos.
Default value: 'https://github.com/thanos-io/thanos/releases/download'
download_extension
Data type: String
Extension of Thanos binaries archive.
Default value: 'tar.gz'
download_url
Data type: Optional[Stdlib::HTTPUrl]
Complete URL corresponding to the Thanos release, default to undef.
Default value: undef
base_dir
Data type: Stdlib::Absolutepath
Base directory where Thanos is extracted.
Default value: '/opt'
bin_dir
Data type: Stdlib::Absolutepath
Directory where binaries are located.
Default value: '/usr/local/bin'
config_dir
Data type: Stdlib::Absolutepath
Directory where configuration are located.
Default value: '/etc/thanos'
purge_config_dir
Data type: Boolean
Purge configuration directory.
Default value: true
tsdb_path
Data type: Stdlib::Absolutepath
Data directory of TSDB.
Default value: '/data'
manage_user
Data type: Boolean
Whether to create user for thanos or rely on external code for that.
Default value: true
manage_group
Data type: Boolean
Whether to create user for thanos or rely on external code for that.
Default value: true
user
Data type: String
User running thanos.
Default value: 'thanos'
group
Data type: String
Group under which thanos is running.
Default value: 'thanos'
usershell
Data type: Stdlib::Absolutepath
if requested, we create a user for thanos. The default shell is false. It can be overwritten to any valid path.
Default value: '/bin/false'
extra_groups
Data type: Array[String]
Add other groups to the managed user.
Default value: []
extract_command
Data type: Optional[String]
Custom command passed to the archive resource to extract the downloaded archive.
Default value: undef
manage_storage_config
Data type: Boolean
Whether to manage storage configuration file.
Default value: false
storage_config_file
Data type: Stdlib::Absolutepath
Path to storage configuration file.
Default value: "${config_dir}/storage.yaml"
storage_config
Data type: Hash[String, Data]
Storage configuration. type: one of ['S3', 'GCS', 'AZURE', 'SWIFT', 'COS', 'ALIYUNOSS', 'FILESYSTEM'] config: storage typed configuration in Hash[String, Data]
Default value: {}
manage_tracing_config
Data type: Boolean
Whether to manage tracing configuration file
Default value: false
tracing_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to tracing configuration file.
Default value: undef
tracing_config
Data type: Hash[String, Data]
Tracing configuration. type: one of ['JAEGER', 'STACKDRIVER', 'ELASTIC_APM', 'LIGHTSTEP'] config: tracing typed configuration in Hash[String, Data]
Default value: {}
manage_index_cache_config
Data type: Boolean
Whether to manage index cache configuration file
Default value: false
index_cache_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to index cache configuration file.
Default value: undef
index_cache_config
Data type: Hash[String, Data]
Index cache configuration. type: one of ['IN-MEMORY', 'MEMCACHED'] config: index cache typed configuration in Hash[String, Data]
Default value: {}
thanos::compact
This class install Compact as service to continuously compacts blocks in an object store bucket.
Examples
include thanos::compact
Parameters
The following parameters are available in the thanos::compact
class:
ensure
user
group
bin_path
log_level
log_format
tracing_config_file
http_address
http_grace_period
data_dir
objstore_config_file
consistency_delay
retention_resolution_raw
retention_resolution_5m
retention_resolution_1h
wait
wait_interval
downsampling_disable
block_viewer_global_sync_block_interval
compact_concurrency
delete_delay
selector_relabel_config_file
web_external_prefix
web_prefix_header
bucket_web_label
extra_params
env_vars
ensure
Data type: Enum['present', 'absent']
State ensured from compact service.
Default value: 'present'
user
Data type: String
User running thanos.
Default value: $thanos::user
group
Data type: String
Group under which thanos is running.
Default value: $thanos::group
bin_path
Data type: Stdlib::Absolutepath
Path where binary is located.
Default value: $thanos::bin_path
log_level
Data type: Thanos::Log_level
Only log messages with the given severity or above. One of: [debug, info, warn, error, fatal]
Default value: 'info'
log_format
Data type: Enum['logfmt', 'json']
Output format of log messages. One of: [logfmt, json]
Default value: 'logfmt'
tracing_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration
Default value: $thanos::tracing_config_file
http_address
Data type: String
Listen host:port for HTTP endpoints.
Default value: '0.0.0.0:10902'
http_grace_period
Data type: String
Time to wait after an interrupt received for HTTP Server.
Default value: '2m'
data_dir
Data type: Optional[Stdlib::Absolutepath]
Data directory in which to cache blocks and process compactions.
Default value: undef
objstore_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration
Default value: $thanos::storage_config_file
consistency_delay
Data type: String
Minimum age of fresh (non-compacted) blocks before they are being processed. Malformed blocks older than the maximum of consistency-delay and 30m0s will be removed.
Default value: '30m'
retention_resolution_raw
Data type: String
How long to retain raw samples in bucket. 0d - disables this retention
Default value: '0d'
retention_resolution_5m
Data type: String
How long to retain samples of resolution 1 (5 minutes) in bucket. 0d - disables this retention
Default value: '0d'
retention_resolution_1h
Data type: String
How long to retain samples of resolution 2 (1 hour) in bucket. 0d - disables this retention
Default value: '0d'
wait
Data type: Boolean
Do not exit after all compactions have been processed and wait for new work.
Default value: false
wait_interval
Data type: String
Wait interval between consecutive compaction runs and bucket refreshes. Only works when --wait flag specified.
Default value: '5m'
downsampling_disable
Data type: Boolean
Disables downsampling. This is not recommended as querying long time ranges without non-downsampled data is not efficient and useful e.g it is not possible to render all samples for a human eye anyway
Default value: false
block_viewer_global_sync_block_interval
Data type: String
Repeat interval for syncing the blocks between local and remote view for /global Block Viewer UI.
Default value: '1m'
compact_concurrency
Data type: Integer
Number of goroutines to use when compacting groups.
Default value: 1
delete_delay
Data type: String
Time before a block marked for deletion is deleted from bucket. If delete-delay is non zero, blocks will be marked for deletion and compactor component will delete blocks marked for deletion from the bucket. If delete-delay is 0, blocks will be deleted straight away. Note that deleting blocks immediately can cause query failures, if store gateway still has the block loaded, or compactor is ignoring the deletion because it's compacting the block at the same time.
Default value: '48h'
selector_relabel_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains relabeling configuration that allows selecting blocks. It follows native Prometheus relabel-config syntax. See format details: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
Default value: undef
web_external_prefix
Data type: Optional[String]
Static prefix for all HTML links and redirect URLs in the bucket web UI interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos bucket web UI to be served behind a reverse proxy that strips a URL sub-path.
Default value: undef
web_prefix_header
Data type: Optional[String]
Name of HTTP request header used for dynamic prefixing of UI links and redirects. This option is ignored if web.external-prefix argument is set. Security risk: enable this option only if a reverse proxy in front of thanos is resetting the header. The --web.prefix-header=X-Forwarded-Prefix option can be useful, for example, if Thanos UI is served via Traefik reverse proxy with PathPrefixStrip option enabled, which sends the stripped prefix value in X-Forwarded-Prefix header. This allows thanos UI to be served on a sub-path.
Default value: undef
bucket_web_label
Data type: Optional[String]
Prometheus label to use as timeline title in the bucket web UI
Default value: undef
extra_params
Data type: Hash
Parameters passed to the binary, ressently released in latest version of Thanos.
Default value: {}
env_vars
Data type: Array
Environment variables passed during startup. Useful for example for ELASTIC_APM tracing integration.
Default value: []
thanos::config
This class install and manage configuration files like object store and tracing.
Examples
include thanos::config
Parameters
The following parameters are available in the thanos::config
class:
manage_storage_config
storage_config_file
storage_config
manage_tracing_config
tracing_config_file
tracing_config
manage_index_cache_config
index_cache_config_file
index_cache_config
manage_storage_config
Data type: Boolean
Whether to manage storage configuration file.
Default value: $thanos::manage_storage_config
storage_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to storage configuration file.
Default value: $thanos::storage_config_file
storage_config
Data type: Hash[String, Data]
Storage configuration. type: one of ['S3', 'GCS', 'AZURE', 'SWIFT', 'COS', 'ALIYUNOSS', 'FILESYSTEM'] config: storage typed configuration in Hash[String, Data]
Default value: $thanos::storage_config
manage_tracing_config
Data type: Boolean
Whether to manage tracing configuration file
Default value: $thanos::manage_tracing_config
tracing_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to tracing configuration file.
Default value: $thanos::tracing_config_file
tracing_config
Data type: Hash[String, Data]
Tracing configuration. type: one of ['JAEGER', 'STACKDRIVER', 'ELASTIC_APM', 'LIGHTSTEP'] config: tracing typed configuration in Hash[String, Data]
Default value: $thanos::tracing_config
manage_index_cache_config
Data type: Boolean
Whether to manage index cache configuration file
Default value: $thanos::manage_index_cache_config
index_cache_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to index cache configuration file.
Default value: $thanos::index_cache_config_file
index_cache_config
Data type: Hash[String, Data]
Index cache configuration. type: one of ['IN-MEMORY', 'MEMCACHED'] config: index cache typed configuration in Hash[String, Data]
Default value: $thanos::index_cache_config
thanos::install
This class install Thanos requirements and binaries.
Examples
include thanos::install
Parameters
The following parameters are available in the thanos::install
class:
version
package_name
os
real_arch
package_ensure
install_method
download_extension
download_url
extract_command
base_dir
bin_dir
config_dir
purge_config_dir
notify_services
manage_user
manage_group
user
group
usershell
extra_groups
version
Data type: Pattern[/\d+\.\d+\.\d+/]
Thanos release. See https://github.com/thanos-io/thanos/releases
Default value: $thanos::version
package_name
Data type: String
Thanos package name - not available yet.
Default value: $thanos::package_name
os
Data type: String
Operating system.
Default value: $thanos::os
real_arch
Data type: String
Architecture (amd64 or arm64).
Default value: $thanos::real_arch
package_ensure
Data type: Enum['present', 'absent', 'latest']
If package, then use this for package ensurel default 'latest'.
Default value: $thanos::package_ensure
install_method
Data type: Enum['url', 'package', 'none']
Installation method: url or package (only url is supported currently).
Default value: $thanos::install_method
download_extension
Data type: String
Extension of Thanos binaries archive.
Default value: $thanos::download_extension
download_url
Data type: Stdlib::HTTPUrl
Complete URL corresponding to the Prometheus release, default to undef.
Default value: $thanos::real_download_url
extract_command
Data type: Optional[String]
Custom command passed to the archive resource to extract the downloaded archive.
Default value: $thanos::extract_command
base_dir
Data type: Stdlib::Absolutepath
Base directory where Thanos is extracted.
Default value: $thanos::base_dir
bin_dir
Data type: Stdlib::Absolutepath
Directory where binaries are located.
Default value: $thanos::bin_dir
config_dir
Data type: Stdlib::Absolutepath
Directory where configuration are located.
Default value: $thanos::config_dir
purge_config_dir
Data type: Boolean
Purge configuration directory.
Default value: $thanos::purge_config_dir
notify_services
Data type: Array[Type[Resource]]
Services to notify when binaries changed.
Default value: $thanos::notify_services
manage_user
Data type: Boolean
Whether to create user for thanos or rely on external code for that.
Default value: $thanos::manage_user
manage_group
Data type: Boolean
Whether to create user for thanos or rely on external code for that.
Default value: $thanos::manage_group
user
Data type: String
User running thanos.
Default value: $thanos::user
group
Data type: String
Group under which thanos is running.
Default value: $thanos::group
usershell
Data type: Stdlib::Absolutepath
if requested, we create a user for thanos. The default shell is false. It can be overwritten to any valid path.
Default value: $thanos::usershell
extra_groups
Data type: Array[String]
Add other groups to the managed user.
Default value: $thanos::extra_groups
thanos::query
This class install Query as service query node exposing PromQL enabled Query API with data retrieved from multiple store nodes.
Examples
include thanos::query
Parameters
The following parameters are available in the thanos::query
class:
ensure
user
group
bin_path
log_level
log_format
tracing_config_file
http_address
http_grace_period
grpc_address
grpc_grace_period
grpc_server_tls_cert
grpc_server_tls_key
grpc_server_tls_client_ca
grpc_client_tls_secure
grpc_client_tls_cert
grpc_client_tls_key
grpc_client_tls_ca
grpc_client_server_name
web_route_prefix
web_external_prefix
web_prefix_header
log_request_decision
query_timeout
query_max_concurrent
query_loopback_delta
query_max_concurrent_select
query_replica_label
selector_labels
endpoints
store_strict
store_sd_files
store_sd_interval
store_sd_dns_interval
store_unhealthy_timeout
query_auto_downsampling
query_partial_response
query_default_evaluation_interval
store_response_timeout
max_open_files
extra_params
env_vars
ensure
Data type: Enum['present', 'absent']
State ensured from compact service.
Default value: 'present'
user
Data type: String
User running thanos.
Default value: $thanos::user
group
Data type: String
Group under which thanos is running.
Default value: $thanos::group
bin_path
Data type: Stdlib::Absolutepath
Path where binary is located.
Default value: $thanos::bin_path
log_level
Data type: Thanos::Log_level
Only log messages with the given severity or above. One of: [debug, info, warn, error, fatal]
Default value: 'info'
log_format
Data type: Enum['logfmt', 'json']
Output format of log messages. One of: [logfmt, json]
Default value: 'logfmt'
tracing_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration
Default value: $thanos::tracing_config_file
http_address
Data type: String
Listen host:port for HTTP endpoints.
Default value: '0.0.0.0:10902'
http_grace_period
Data type: String
Time to wait after an interrupt received for HTTP Server.
Default value: '2m'
grpc_address
Data type: String
Listen ip:port address for gRPC endpoints (StoreAPI). Make sure this address is routable from other components.
Default value: '0.0.0.0:10901'
grpc_grace_period
Data type: String
Time to wait after an interrupt received for GRPC Server.
Default value: '2m'
grpc_server_tls_cert
Data type: Optional[Stdlib::Absolutepath]
TLS Certificate for gRPC server, leave blank to disable TLS
Default value: undef
grpc_server_tls_key
Data type: Optional[Stdlib::Absolutepath]
TLS Key for the gRPC server, leave blank to disable TLS
Default value: undef
grpc_server_tls_client_ca
Data type: Optional[Stdlib::Absolutepath]
TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert)
Default value: undef
grpc_client_tls_secure
Data type: Boolean
Use TLS when talking to the gRPC server
Default value: false
grpc_client_tls_cert
Data type: Optional[Stdlib::Absolutepath]
TLS Certificates to use to identify this client to the server
Default value: undef
grpc_client_tls_key
Data type: Optional[Stdlib::Absolutepath]
TLS Key for the client's certificate
Default value: undef
grpc_client_tls_ca
Data type: Optional[Stdlib::Absolutepath]
TLS CA Certificates to use to verify gRPC servers
Default value: undef
grpc_client_server_name
Data type: Optional[String]
Server name to verify the hostname on the returned gRPC certificates. See https://tools.ietf.org/html/rfc4366#section-3.1
Default value: undef
web_route_prefix
Data type: Optional[String]
Prefix for API and UI endpoints. This allows thanos UI to be served on a sub-path. This option is analogous to --web.route-prefix of Promethus.
Default value: undef
web_external_prefix
Data type: Optional[String]
Static prefix for all HTML links and redirect URLs in the UI query web interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos UI to be served behind a reverse proxy that strips a URL sub-path.
Default value: undef
web_prefix_header
Data type: Optional[String]
Name of HTTP request header used for dynamic prefixing of UI links and redirects. This option is ignored if web.external-prefix argument is set. Security risk: enable this option only if a reverse proxy in front of thanos is resetting the header. The --web.prefix-header=X-Forwarded-Prefix option can be useful, for example, if Thanos UI is served via Traefik reverse proxy with PathPrefixStrip option enabled, which sends the stripped prefix value in X-Forwarded-Prefix header. This allows thanos UI to be served on a sub-path.
Default value: undef
log_request_decision
Data type: Optional[String]
Request Logging for logging the start and end of requests. LogFinishCall is enabled by default. LogFinishCall : Logs the finish call of the requests. LogStartAndFinishCall : Logs the start and finish call of the requests. NoLogCall : Disable request logging.
Default value: undef
query_timeout
Data type: String
Maximum time to process query by query node.
Default value: '2m'
query_max_concurrent
Data type: Integer
Maximum number of queries processed concurrently by query node.
Default value: 20
query_loopback_delta
Data type: Optional[String]
The maximum lookback duration for retrieving metrics during expression evaluations. PromQL always evaluates the query for the certain timestamp (query range timestamps are deduced by step). Since scrape intervals might be different, PromQL looks back for given amount of time to get latest sample. If it exceeds the maximum lookback delta it assumes series is stale and returns none (a gap). This is why lookback delta should be set to at least 2 times of the slowest scrape interval. If unset it will use the promql default of 5m.
Default value: undef
query_max_concurrent_select
Data type: Integer
Maximum number of select requests made concurrently per a query.
Default value: 4
query_replica_label
Data type: Optional[String]
Labels to treat as a replica indicator along which data is deduplicated. Still you will be able to query without deduplication using 'dedup=false' parameter.
Default value: undef
selector_labels
Data type: Array[String]
Query selector labels that will be exposed in info endpoint.
Default value: []
endpoints
Data type: Array[String]
(Replace stores) Addresses of statically configured store API servers. The scheme may be prefixed with 'dns+' or 'dnssrv+' to detect store API servers through respective DNS lookups.
Default value: []
store_strict
Data type: Optional[String]
Addresses of only statically configured store API servers that are always used, even if the health check fails. Useful if you have a caching layer on top.
Default value: undef
store_sd_files
Data type: Array[Stdlib::Absolutepath]
Path to files that contain addresses of store API servers. The path can be a glob pattern.
Default value: []
store_sd_interval
Data type: String
Refresh interval to re-read file SD files. It is used as a resync fallback.
Default value: '5m'
store_sd_dns_interval
Data type: String
Interval between DNS resolutions.
Default value: '30s'
store_unhealthy_timeout
Data type: String
Timeout before an unhealthy store is cleaned from the store UI page.
Default value: '30s'
query_auto_downsampling
Data type: Boolean
Enable automatic adjustment (step / 5) to what source of data should be used in store gateways if no max_source_resolution param is specified.
Default value: false
query_partial_response
Data type: Boolean
Enable partial response for queries if no partial_response param is specified. --no-query.partial-response for disabling.
Default value: false
query_default_evaluation_interval
Data type: String
Set default evaluation interval for sub queries.
Default value: '1m'
store_response_timeout
Data type: String
If a Store doesn't send any data in this specified duration then a Store will be ignored and partial data will be returned if it's enabled. 0 disables timeout.
Default value: '0ms'
max_open_files
Data type: Optional[Integer]
Define how many open files the service is able to use In some cases, the default value (1024) needs to be increased
Default value: undef
extra_params
Data type: Hash
Parameters passed to the binary, ressently released in latest version of Thanos.
Default value: {}
env_vars
Data type: Array
Environment variables passed during startup. Useful for example for ELASTIC_APM tracing integration.
Default value: []
thanos::query_frontend
This class install Query Frontend as service that can be put in front of Thanos Queriers to improve the read path.
Examples
include thanos::query
Parameters
The following parameters are available in the thanos::query_frontend
class:
ensure
user
group
bin_path
log_level
log_format
tracing_config_file
query_range_split_interval
query_range_max_retries_per_request
query_range_max_query_length
query_range_max_query_parrallelism
query_range_response_cache_max_freshness
query_range_partial_response
query_range_response_cache_config_file
http_address
http_grace_period
query_frontend_downstream_url
query_frontend_compress_responses
query_frontend_log_queries_longer_than
log_request_decision
max_open_files
extra_params
env_vars
ensure
Data type: Enum['present', 'absent']
State ensured from compact service.
Default value: 'present'
user
Data type: String
User running thanos.
Default value: $thanos::user
group
Data type: String
Group under which thanos is running.
Default value: $thanos::group
bin_path
Data type: Stdlib::Absolutepath
Path where binary is located.
Default value: $thanos::bin_path
log_level
Data type: Thanos::Log_level
Only log messages with the given severity or above. One of: [debug, info, warn, error, fatal]
Default value: 'info'
log_format
Data type: Enum['logfmt', 'json']
Output format of log messages. One of: [logfmt, json]
Default value: 'logfmt'
tracing_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration
Default value: $thanos::tracing_config_file
query_range_split_interval
Data type: String
Split queries by an interval and execute in parallel, 0 disables it.
Default value: '24h'
query_range_max_retries_per_request
Data type: Integer
Maximum number of retries for a single request; beyond this, the downstream error is returned.
Default value: 5
query_range_max_query_length
Data type: Integer
Limit the query time range (end - start time) in the query-frontend, 0 disables it.
Default value: 0
query_range_max_query_parrallelism
Data type: Integer
Maximum number of queries will be scheduled in parallel by the frontend.
Default value: 14
query_range_response_cache_max_freshness
Data type: String
Most recent allowed cacheable result, to prevent caching very recent results that might still be in flux.
Default value: '1m'
query_range_partial_response
Data type: Boolean
Enable partial response for queries if no partial_response param is specified. --no-query-range.partial-response for disabling.
Default value: false
query_range_response_cache_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains response cache configuration.
Default value: undef
http_address
Data type: String
Listen host:port for HTTP endpoints.
Default value: '0.0.0.0:10902'
http_grace_period
Data type: String
Time to wait after an interrupt received for HTTP Server.
Default value: '2m'
query_frontend_downstream_url
Data type: Stdlib::HTTPUrl
URL of downstream Prometheus Query compatible API.
Default value: 'http://localhost:9090'
query_frontend_compress_responses
Data type: Boolean
Compress HTTP responses.
Default value: false
query_frontend_log_queries_longer_than
Data type: String
Log queries that are slower than the specified duration. Set to 0 to disable. Set to < 0 to enable on all queries.
Default value: "0"
log_request_decision
Data type: Optional[String]
Request Logging for logging the start and end of requests. LogFinishCall is enabled by default. LogFinishCall : Logs the finish call of the requests. LogStartAndFinishCall : Logs the start and finish call of the requests. NoLogCall : Disable request logging.
Default value: undef
max_open_files
Data type: Optional[Integer]
Define how many open files the service is able to use In some cases, the default value (1024) needs to be increased
Default value: undef
extra_params
Data type: Hash
Parameters passed to the binary, ressently released in latest version of Thanos.
Default value: {}
env_vars
Data type: Array
Environment variables passed during startup. Useful for example for ELASTIC_APM tracing integration.
Default value: []
thanos::receive
This class install Receiver as service that implements the Prometheus Remote Write API.
Examples
include thanos::downsample
Parameters
The following parameters are available in the thanos::receive
class:
ensure
user
group
bin_path
log_level
log_format
tracing_config_file
http_address
http_grace_period
grpc_address
grpc_grace_period
grpc_server_tls_cert
grpc_server_tls_key
grpc_server_tls_client_ca
remote_write_address
remote_write_server_tls_cert
remote_write_server_tls_key
remote_write_server_tls_client_ca
remote_write_client_tls_cert
remote_write_client_tls_key
remote_write_client_tls_ca
remote_write_client_server_name
tsdb_path
objstore_config_file
tsdb_retention
receive_hashrings_file
receive_hashrings_file_refresh_interval
receive_local_endpoint
receive_tenant_header
receive_default_tenant_id
receive_tenant_label_name
receive_replica_header
receive_replication_factor
tsdb_wal_compression
tsdb_no_lockfile
labels
extra_params
env_vars
ensure
Data type: Enum['present', 'absent']
State ensured from compact service.
Default value: 'present'
user
Data type: String
User running thanos.
Default value: $thanos::user
group
Data type: String
Group under which thanos is running.
Default value: $thanos::group
bin_path
Data type: Stdlib::Absolutepath
Path where binary is located.
Default value: $thanos::bin_path
log_level
Data type: Thanos::Log_level
Only log messages with the given severity or above. One of: [debug, info, warn, error, fatal]
Default value: 'info'
log_format
Data type: Enum['logfmt', 'json']
Output format of log messages. One of: [logfmt, json]
Default value: 'logfmt'
tracing_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration
Default value: $thanos::tracing_config_file
http_address
Data type: String
Listen host:port for HTTP endpoints.
Default value: '0.0.0.0:10902'
http_grace_period
Data type: String
Time to wait after an interrupt received for HTTP Server.
Default value: '2m'
grpc_address
Data type: String
Listen ip:port address for gRPC endpoints (StoreAPI). Make sure this address is routable from other components.
Default value: '0.0.0.0:10901'
grpc_grace_period
Data type: String
Time to wait after an interrupt received for GRPC Server.
Default value: '2m'
grpc_server_tls_cert
Data type: Optional[Stdlib::Absolutepath]
TLS Certificate for gRPC server, leave blank to disable TLS
Default value: undef
grpc_server_tls_key
Data type: Optional[Stdlib::Absolutepath]
TLS Key for the gRPC server, leave blank to disable TLS
Default value: undef
grpc_server_tls_client_ca
Data type: Optional[Stdlib::Absolutepath]
TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert)
Default value: undef
remote_write_address
Data type: String
Address to listen on for remote write requests.
Default value: '0.0.0.0:19291'
remote_write_server_tls_cert
Data type: Optional[Stdlib::Absolutepath]
TLS Certificate for HTTP server, leave blank to disable TLS.
Default value: undef
remote_write_server_tls_key
Data type: Optional[Stdlib::Absolutepath]
TLS Key for the HTTP server, leave blank to disable TLS.
Default value: undef
remote_write_server_tls_client_ca
Data type: Optional[Stdlib::Absolutepath]
TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert)
Default value: undef
remote_write_client_tls_cert
Data type: Optional[Stdlib::Absolutepath]
TLS Certificates to use to identify this client to the server.
Default value: undef
remote_write_client_tls_key
Data type: Optional[Stdlib::Absolutepath]
TLS Key for the client's certificate.
Default value: undef
remote_write_client_tls_ca
Data type: Optional[Stdlib::Absolutepath]
TLS CA Certificates to use to verify servers.
Default value: undef
remote_write_client_server_name
Data type: Optional[String]
Server name to verify the hostname on the returned gRPC certificates. See https://tools.ietf.org/html/rfc4366#section-3.1
Default value: undef
tsdb_path
Data type: Optional[Stdlib::Absolutepath]
Data directory of TSDB.
Default value: undef
objstore_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration
Default value: $thanos::storage_config_file
tsdb_retention
Data type: String
How long to retain raw samples on local storage. 0d - disables this retention.
Default value: '15d'
receive_hashrings_file
Data type: Optional[Stdlib::Absolutepath]
Path to file that contains the hashring configuration.
Default value: undef
receive_hashrings_file_refresh_interval
Data type: String
Refresh interval to re-read the hashring configuration file. (used as a fallback)
Default value: '5m'
receive_local_endpoint
Data type: Optional[String]
Endpoint of local receive node. Used to identify the local node in the hashring configuration.
Default value: undef
receive_tenant_header
Data type: String
HTTP header to determine tenant for write requests.
Default value: 'THANOS-TENANT'
receive_default_tenant_id
Data type: String
HDefault tenant ID to use when none is provided via a header.
Default value: 'default-tenant'
receive_tenant_label_name
Data type: String
Label name through which the tenant will be announced.
Default value: 'tenant_id'
receive_replica_header
Data type: String
HTTP header specifying the replica number of a write request.
Default value: 'THANOS-REPLICA'
receive_replication_factor
Data type: Integer
How many times to replicate incoming write requests.
Default value: 1
tsdb_wal_compression
Data type: Boolean
Compress the tsdb WAL.
Default value: false
tsdb_no_lockfile
Data type: Boolean
Do not create lockfile in TSDB data directory. In any case, the lockfiles will be deleted on next startup.
Default value: false
labels
Data type: Array[String]
External labels to announce. This flag will be removed in the future when handling multiple tsdb instances is added.
Default value: []
extra_params
Data type: Hash
Parameters passed to the binary, ressently released in latest version of Thanos.
Default value: {}
env_vars
Data type: Array
Environment variables passed during startup. Useful for example for ELASTIC_APM tracing integration.
Default value: []
thanos::rule
This class install Rule as service ruler evaluating Prometheus rules against given Query nodes, exposing Store API and storing old blocks in bucket.
Examples
include thanos::rule
Parameters
The following parameters are available in the thanos::rule
class:
ensure
user
group
bin_path
log_level
log_format
tracing_config_file
http_address
http_grace_period
grpc_address
grpc_grace_period
grpc_server_tls_cert
grpc_server_tls_key
grpc_server_tls_client_ca
labels
data_dir
rule_files
resend_delay
eval_interval
tsdb_block_duration
tsdb_retention
tsdb_no_lockfile
tsdb_wal_compression
alertmanagers_url
alertmanagers_send_timeout
alertmanagers_config_file
alertmanagers_sd_dns_interval
alert_query_url
alert_label_drop
web_route_prefix
web_external_prefix
web_prefix_header
log_request_decision
objstore_config_file
queries
query_config_file
query_sd_files
query_sd_interval
query_sd_dns_interval
max_open_files
extra_params
env_vars
ensure
Data type: Enum['present', 'absent']
State ensured from compact service.
Default value: 'present'
user
Data type: String
User running thanos.
Default value: $thanos::user
group
Data type: String
Group under which thanos is running.
Default value: $thanos::group
bin_path
Data type: Stdlib::Absolutepath
Path where binary is located.
Default value: $thanos::bin_path
log_level
Data type: Thanos::Log_level
Only log messages with the given severity or above. One of: [debug, info, warn, error, fatal]
Default value: 'info'
log_format
Data type: Enum['logfmt', 'json']
Output format of log messages. One of: [logfmt, json]
Default value: 'logfmt'
tracing_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration
Default value: $thanos::tracing_config_file
http_address
Data type: String
Listen host:port for HTTP endpoints.
Default value: '0.0.0.0:10902'
http_grace_period
Data type: String
Time to wait after an interrupt received for HTTP Server.
Default value: '2m'
grpc_address
Data type: String
Listen ip:port address for gRPC endpoints (StoreAPI). Make sure this address is routable from other components.
Default value: '0.0.0.0:10901'
grpc_grace_period
Data type: String
Time to wait after an interrupt received for GRPC Server.
Default value: '2m'
grpc_server_tls_cert
Data type: Optional[Stdlib::Absolutepath]
TLS Certificate for gRPC server, leave blank to disable TLS
Default value: undef
grpc_server_tls_key
Data type: Optional[Stdlib::Absolutepath]
TLS Key for the gRPC server, leave blank to disable TLS
Default value: undef
grpc_server_tls_client_ca
Data type: Optional[Stdlib::Absolutepath]
TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert)
Default value: undef
labels
Data type: Array[String]
Labels to be applied to all generated metrics. Similar to external labels for Prometheus, used to identify ruler and its blocks as unique source.
Default value: []
data_dir
Data type: Optional[Stdlib::Absolutepath]
Data directory.
Default value: undef
rule_files
Data type: Array[Stdlib::Absolutepath]
Rule files that should be used by rule manager. Can be in glob format.
Default value: []
resend_delay
Data type: String
Minimum amount of time to wait before resending an alert to Alertmanager.
Default value: '1m'
eval_interval
Data type: String
The default evaluation interval to use.
Default value: '30s'
tsdb_block_duration
Data type: String
Block duration for TSDB block.
Default value: '2h'
tsdb_retention
Data type: String
Block retention time on local disk.
Default value: '48h'
tsdb_no_lockfile
Data type: Boolean
Do not create lockfile in TSDB data directory. In any case, the lockfiles will be deleted on next startup.
Default value: false
tsdb_wal_compression
Data type: Boolean
Compress the tsdb WAL.
Default value: false
alertmanagers_url
Data type: Array[Stdlib::HTTPUrl]
Alertmanager replica URLs to push firing alerts. Ruler claims success if push to at least one alertmanager from discovered succeeds. The scheme may be prefixed with 'dns+' or 'dnssrv+' to detect Alertmanager IPs through respective DNS lookups. The port defaults to 9093 or the SRV record's value. The URL path is used as a prefix for the regular Alertmanager API path.
Default value: []
alertmanagers_send_timeout
Data type: String
Timeout for sending alerts to alertmanager
Default value: '10s'
alertmanagers_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains alerting configuration. See format details: https://thanos.io/components/rule.md/#configuration. If defined, it takes precedence over the alertmanagers_url and alertmanagers_send_timeout options.
Default value: undef
alertmanagers_sd_dns_interval
Data type: String
Interval between DNS resolutions of Alertmanager hosts.
Default value: '30s'
alert_query_url
Data type: Optional[Stdlib::HTTPUrl]
The external Thanos Query URL that would be set in all alerts 'Source' field
Default value: undef
alert_label_drop
Data type: Array[String]
Labels by name to drop before sending to alertmanager. This allows alert to be deduplicated on replica label. Similar Prometheus alert relabelling
Default value: []
web_route_prefix
Data type: Optional[String]
Prefix for API and UI endpoints. This allows thanos UI to be served on a sub-path. This option is analogous to --web.route-prefix of Prometheus.
Default value: undef
web_external_prefix
Data type: Optional[String]
Static prefix for all HTML links and redirect URLs in the UI query web interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos UI to be served behind a reverse proxy that strips a URL sub-path.
Default value: undef
web_prefix_header
Data type: Optional[String]
Name of HTTP request header used for dynamic prefixing of UI links and redirects. This option is ignored if web.external-prefix argument is set. Security risk: enable this option only if a reverse proxy in front of thanos is resetting the header. The --web.prefix-header=X-Forwarded-Prefix option can be useful, for example, if Thanos UI is served via Traefik reverse proxy with PathPrefixStrip option enabled, hich sends the stripped prefix value in X-Forwarded-Prefix header. This allows thanos UI to be served on a sub-path.
Default value: undef
log_request_decision
Data type: Optional[String]
Request Logging for logging the start and end of requests. LogFinishCall is enabled by default. LogFinishCall : Logs the finish call of the requests. LogStartAndFinishCall : Logs the start and finish call of the requests. NoLogCall : Disable request logging.
Default value: undef
objstore_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration
Default value: undef
queries
Data type: Array[String]
Addresses of statically configured query API servers. The scheme may be prefixed with 'dns+' or 'dnssrv+' to detect query API servers through respective DNS lookups.
Default value: []
query_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains query API servers configuration. See format details: https://thanos.io/components/rule.md/#configuration. If defined, it takes precedence over the queries and query.sd-files options.
Default value: undef
query_sd_files
Data type: Array[Stdlib::Absolutepath]
Path to file that contain addresses of query peers. The path can be a glob pattern.
Default value: []
query_sd_interval
Data type: String
Refresh interval to re-read file SD files. (used as a fallback)
Default value: '5m'
query_sd_dns_interval
Data type: String
Interval between DNS resolutions.
Default value: '30s'
max_open_files
Data type: Optional[Integer]
Define how many open files the service is able to use In some cases, the default value (1024) needs to be increased
Default value: undef
extra_params
Data type: Hash
Parameters passed to the binary, ressently released in latest version of Thanos.
Default value: {}
env_vars
Data type: Array
Environment variables passed during startup. Useful for example for ELASTIC_APM tracing integration.
Default value: []
thanos::sidecar
This class install Sidecar as service sidecar for Prometheus server.
Examples
include thanos::sidecar
Parameters
The following parameters are available in the thanos::sidecar
class:
ensure
user
group
bin_path
log_level
log_format
tracing_config_file
http_address
http_grace_period
grpc_address
grpc_grace_period
grpc_server_tls_cert
grpc_server_tls_key
grpc_server_tls_client_ca
prometheus_url
prometheus_ready_timeout
tsdb_path
reloader_config_file
reloader_config_envsubst_file
reloader_rule_dirs
reloader_watch_interval
reloader_retry_interval
objstore_config_file
shipper_upload_compacted
min_time
max_open_files
extra_params
env_vars
ensure
Data type: Enum['present', 'absent']
State ensured from compact service.
Default value: 'present'
user
Data type: String
User running thanos.
Default value: $thanos::user
group
Data type: String
Group under which thanos is running.
Default value: $thanos::group
bin_path
Data type: Stdlib::Absolutepath
Path where binary is located.
Default value: $thanos::bin_path
log_level
Data type: Thanos::Log_level
Only log messages with the given severity or above. One of: [debug, info, warn, error, fatal]
Default value: 'info'
log_format
Data type: Enum['logfmt', 'json']
Output format of log messages. One of: [logfmt, json]
Default value: 'logfmt'
tracing_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration
Default value: $thanos::tracing_config_file
http_address
Data type: String
Listen host:port for HTTP endpoints.
Default value: '0.0.0.0:10902'
http_grace_period
Data type: String
Time to wait after an interrupt received for HTTP Server.
Default value: '2m'
grpc_address
Data type: String
Listen ip:port address for gRPC endpoints (StoreAPI). Make sure this address is routable from other components.
Default value: '0.0.0.0:10901'
grpc_grace_period
Data type: String
Time to wait after an interrupt received for GRPC Server.
Default value: '2m'
grpc_server_tls_cert
Data type: Optional[Stdlib::Absolutepath]
TLS Certificate for gRPC server, leave blank to disable TLS
Default value: undef
grpc_server_tls_key
Data type: Optional[Stdlib::Absolutepath]
TLS Key for the gRPC server, leave blank to disable TLS
Default value: undef
grpc_server_tls_client_ca
Data type: Optional[Stdlib::Absolutepath]
TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert)
Default value: undef
prometheus_url
Data type: Stdlib::HTTPUrl
URL at which to reach Prometheus's API. For better performance use local network.
Default value: 'http://localhost:9090'
prometheus_ready_timeout
Data type: String
Maximum time to wait for the Prometheus instance to start up
Default value: '10m'
tsdb_path
Data type: Stdlib::Absolutepath
Data directory of TSDB.
Default value: $thanos::tsdb_path
reloader_config_file
Data type: Optional[Stdlib::Absolutepath]
Config file watched by the reloader.
Default value: undef
reloader_config_envsubst_file
Data type: Optional[Stdlib::Absolutepath]
Output file for environment variable substituted config file.
Default value: undef
reloader_rule_dirs
Data type: Array[Stdlib::Absolutepath]
Rule directories for the reloader to refresh.
Default value: []
reloader_watch_interval
Data type: String
Controls how often reloader re-reads config and rules.
Default value: '3m'
reloader_retry_interval
Data type: String
Controls how often reloader retries config reload in case of error.
Default value: '5s'
objstore_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration
Default value: $thanos::storage_config_file
shipper_upload_compacted
Data type: Boolean
If true sidecar will try to upload compacted blocks as well. Useful for migration purposes. Works only if compaction is disabled on Prometheus. Do it once and then disable the flag when done.
Default value: false
min_time
Data type: Optional[String]
Start of time range limit to serve. Thanos sidecar will serve only metrics, which happened later than this value. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y.
Default value: undef
max_open_files
Data type: Optional[Integer]
Define how many open files the service is able to use In some cases, the default value (1024) needs to be increased
Default value: undef
extra_params
Data type: Hash
Parameters passed to the binary, ressently released in latest version of Thanos.
Default value: {}
env_vars
Data type: Array
Environment variables passed during startup. Useful for example for ELASTIC_APM tracing integration.
Default value: []
thanos::store
This class install Store as service store node giving access to blocks in a bucket provider. Now supported GCS, S3, Azure, Swift and Tencent COS..
Examples
include thanos::store
Parameters
The following parameters are available in the thanos::store
class:
ensure
user
group
bin_path
log_level
log_format
tracing_config_file
http_address
http_grace_period
grpc_address
grpc_grace_period
grpc_server_tls_cert
grpc_server_tls_key
grpc_server_tls_client_ca
data_dir
index_cache_config_file
index_cache_size
chunck_pool_size
store_grpc_series_sample_limit
store_grpc_series_max_concurrency
objstore_config_file
sync_block_duration
block_sync_concurrency
min_time
max_time
selector_relabel_config_file
consistency_delay
ignore_deletion_marks_delay
web_external_prefix
web_prefix_header
max_open_files
extra_params
env_vars
ensure
Data type: Enum['present', 'absent']
State ensured from compact service.
Default value: 'present'
user
Data type: String
User running thanos.
Default value: $thanos::user
group
Data type: String
Group under which thanos is running.
Default value: $thanos::group
bin_path
Data type: Stdlib::Absolutepath
Path where binary is located.
Default value: $thanos::bin_path
log_level
Data type: Thanos::Log_level
Only log messages with the given severity or above. One of: [debug, info, warn, error, fatal]
Default value: 'info'
log_format
Data type: Enum['logfmt', 'json']
Output format of log messages. One of: [logfmt, json]
Default value: 'logfmt'
tracing_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration
Default value: $thanos::tracing_config_file
http_address
Data type: String
Listen host:port for HTTP endpoints.
Default value: '0.0.0.0:10902'
http_grace_period
Data type: String
Time to wait after an interrupt received for HTTP Server.
Default value: '2m'
grpc_address
Data type: String
Listen ip:port address for gRPC endpoints (StoreAPI). Make sure this address is routable from other components.
Default value: '0.0.0.0:10901'
grpc_grace_period
Data type: String
Time to wait after an interrupt received for GRPC Server.
Default value: '2m'
grpc_server_tls_cert
Data type: Optional[Stdlib::Absolutepath]
TLS Certificate for gRPC server, leave blank to disable TLS
Default value: undef
grpc_server_tls_key
Data type: Optional[Stdlib::Absolutepath]
TLS Key for the gRPC server, leave blank to disable TLS
Default value: undef
grpc_server_tls_client_ca
Data type: Optional[Stdlib::Absolutepath]
TLS CA to verify clients against. If no client CA is specified, there is no client verification on server side. (tls.NoClientCert)
Default value: undef
data_dir
Data type: Optional[Stdlib::Absolutepath]
Data directory in which to cache remote blocks.
Default value: undef
index_cache_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains index cache configuration. See format details: https://thanos.io/components/store.md/#index-cache
Default value: undef
index_cache_size
Data type: String
Maximum size of items held in the index cache.
Default value: '250MB'
chunck_pool_size
Data type: String
Maximum size of concurrently allocatable bytes for chunks.
Default value: '2GB'
store_grpc_series_sample_limit
Data type: Integer
Maximum amount of samples returned via a single Series call. 0 means no limit. NOTE: for efficiency we take 120 as the number of samples in chunk (it cannot be bigger than that), so the actual number of samples might be lower, even though the maximum could be hit.
Default value: 0
store_grpc_series_max_concurrency
Data type: Integer
Maximum number of concurrent Series calls.
Default value: 20
objstore_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration
Default value: $thanos::storage_config_file
sync_block_duration
Data type: String
Repeat interval for syncing the blocks between local and remote view.
Default value: '3m'
block_sync_concurrency
Data type: Integer
Number of goroutines to use when syncing blocks from object storage.
Default value: 20
min_time
Data type: Optional[String]
Start of time range limit to serve. Thanos Store will serve only metrics, which happened later than this value. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y.
Default value: undef
max_time
Data type: Optional[String]
End of time range limit to serve. Thanos Store will serve only blocks, which happened eariler than this value. Option can be a constant time in RFC3339 format or time duration relative to current time, such as -1d or 2h45m. Valid duration units are ms, s, m, h, d, w, y.
Default value: undef
selector_relabel_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains relabeling configuration that allows selecting blocks. It follows native Prometheus relabel-config syntax. See format details: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
Default value: undef
consistency_delay
Data type: String
Minimum age of all blocks before they are being read.
Default value: '30m'
ignore_deletion_marks_delay
Data type: String
Duration after which the blocks marked for deletion will be filtered out while fetching blocks. The idea of ignore-deletion-marks-delay is to ignore blocks that are marked for deletion with some delay. This ensures store can still serve blocks that are meant to be deleted but do not have a replacement yet. If delete-delay duration is provided to compactor or bucket verify component, it will upload deletion-mark.json file to mark after what duration the block should be deleted rather than deleting the block straight away. If delete-delay is non-zero for compactor or bucket verify component, ignore-deletion-marks-delay should be set to (delete-delay)/2 so that blocks marked for deletion are filtered out while fetching blocks before being deleted from bucket. Default is 24h, half of the default value for --delete-delay on compactor.
Default value: '24h'
web_external_prefix
Data type: Optional[String]
Static prefix for all HTML links and redirect URLs in the UI query web interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos UI to be served behind a reverse proxy that strips a URL sub-path.
Default value: undef
web_prefix_header
Data type: Optional[String]
Name of HTTP request header used for dynamic prefixing of UI links and redirects. This option is ignored if web.external-prefix argument is set. Security risk: enable this option only if a reverse proxy in front of thanos is resetting the header. The --web.prefix-header=X-Forwarded-Prefix option can be useful, for example, if Thanos UI is served via Traefik reverse proxy with PathPrefixStrip option enabled, which sends the stripped prefix value in X-Forwarded-Prefix header. This allows thanos UI to be served on a sub-path.
Default value: undef
max_open_files
Data type: Optional[Integer]
Define how many open files the service is able to use In some cases, the default value (1024) needs to be increased
Default value: undef
extra_params
Data type: Hash
Parameters passed to the binary, ressently released in latest version of Thanos.
Default value: {}
env_vars
Data type: Array
Environment variables passed during startup. Useful for example for ELASTIC_APM tracing integration.
Default value: []
thanos::tools::bucket_web
This class install Web interface for remote storage bucket.
Examples
include thanos::bucket_web
Parameters
The following parameters are available in the thanos::tools::bucket_web
class:
ensure
user
group
bin_path
log_level
log_format
tracing_config_file
objstore_config_file
http_address
http_grace_period
web_external_prefix
web_prefix_header
refresh
timeout
label
max_open_files
extra_params
env_vars
ensure
Data type: Enum['present', 'absent']
State ensured from compact service.
Default value: 'present'
user
Data type: String
User running thanos.
Default value: $thanos::user
group
Data type: String
Group under which thanos is running.
Default value: $thanos::group
bin_path
Data type: Stdlib::Absolutepath
Path where binary is located.
Default value: $thanos::bin_path
log_level
Data type: Thanos::Log_level
Only log messages with the given severity or above. One of: [debug, info, warn, error, fatal]
Default value: 'info'
log_format
Data type: Enum['logfmt', 'json']
Output format of log messages. One of: [logfmt, json]
Default value: 'logfmt'
tracing_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file with tracing configuration. See format details: https://thanos.io/tracing.md/#configuration
Default value: $thanos::tracing_config_file
objstore_config_file
Data type: Optional[Stdlib::Absolutepath]
Path to YAML file that contains object store configuration. See format details: https://thanos.io/storage.md/#configuration
Default value: $thanos::storage_config_file
http_address
Data type: String
Listen host:port for HTTP endpoints.
Default value: '0.0.0.0:10902'
http_grace_period
Data type: String
Time to wait after an interrupt received for HTTP Server.
Default value: '2m'
web_external_prefix
Data type: Optional[String]
Static prefix for all HTML links and redirect URLs in the bucket web UI interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos bucket web UI to be served behind a reverse proxy that strips a URL sub-path.
Default value: undef
web_prefix_header
Data type: Optional[String]
Name of HTTP request header used for dynamic prefixing of UI links and redirects. This option is ignored if web.external-prefix argument is set. Security risk: enable this option only if a reverse proxy in front of thanos is resetting the header. The --web.prefix-header=X-Forwarded-Prefix option can be useful, for example, if Thanos UI is served via Traefik reverse proxy with PathPrefixStrip option enabled, which sends the stripped prefix value in X-Forwarded-Prefix header. This allows thanos UI to be served on a sub-path.
Default value: undef
refresh
Data type: String
Refresh interval to download metadata from remote storage
Default value: '30m'
timeout
Data type: String
Timeout to download metadata from remote storage
Default value: '5m'
label
Data type: Optional[String]
Prometheus label to use as timeline title
Default value: undef
max_open_files
Data type: Optional[Integer]
Define how many open files the service is able to use In some cases, the default value (1024) needs to be increased
Default value: undef
extra_params
Data type: Hash
Parameters passed to the binary, ressently released in latest version of Thanos.
Default value: {}
env_vars
Data type: Array
Environment variables passed during startup. Useful for example for ELASTIC_APM tracing integration.
Default value: []
Defined types
thanos::config::index_cache
Manage Index cache configuration file.
Examples
thanos::config::index_cache { '/etc/thanos/index_cache.yaml':
ensure => 'present',
type => 'IN-MEMORY',
config => {
max_size => 0,
max_item_size => 0,
},
}
Parameters
The following parameters are available in the thanos::config::index_cache
defined type:
ensure
Data type: Enum['present', 'absent']
State ensured from configuration file.
type
Data type: Thanos::Index_cache_type
Type of Index cache. One of ['IN-MEMORY', 'MEMCACHED']
config
Data type: Hash[String, Data]
Configuration to typed index cache.
thanos::config::storage
Manage Storage configuration file.
Examples
thanos::config::storage { '/etc/thanos/storage.yaml':
ensure => 'present',
type => 'FILESYSTEM',
config => {
directory => '/data',
},
}
Parameters
The following parameters are available in the thanos::config::storage
defined type:
ensure
Data type: Enum['present', 'absent']
State ensured from configuration file.
type
Data type: Thanos::Storage_type
Type of Storage configurarion. One of ['S3', 'GCS', 'AZURE', 'SWIFT', 'COS', 'ALIYUNOSS', 'FILESYSTEM']
config
Data type: Hash[String, Data]
Configuration to typed storage.
prefix
Data type: String
Set the prefix for to be used on the storage
Default value: ''
thanos::config::tracing
Manage Tracing configuration file
Examples
thanos::config::tracing { '/etc/thanos/tracing.yaml':
ensure => 'present',
type => 'JAEGER',
config => {...},
}
Parameters
The following parameters are available in the thanos::config::tracing
defined type:
ensure
Data type: Enum['present', 'absent']
State ensured from configuration file.
type
Data type: Thanos::Tracing_type
Type of Tracing configurarion. One of ['JAEGER', 'STACKDRIVER', 'ELASTIC_APM', 'LIGHTSTEP']
config
Data type: Hash[String, Data]
Configuration to typed tracing.
thanos::resources::service
This defined type create component's service.
Examples
thanos::resources::service { 'component_name':
ensure => 'running',
bin_path => '/usr/local/bin/thanos',
}
Parameters
The following parameters are available in the thanos::resources::service
defined type:
ensure
Data type: Variant[Stdlib::Ensure::Service, Enum['absent']]
State ensured from component service.
bin_path
Data type: Stdlib::Absolutepath
Path where binary is located.
user
Data type: String
User running thanos.
group
Data type: String
Group under which thanos is running.
max_open_files
Data type: Optional[Integer]
Define the maximum open files the service is allowed to use
Default value: undef
params
Data type: Hash
Parameters passed to the binary.
Changelog
All notable changes to this project will be documented in this file.
Release 1.5.1
Features
- #47 : add env vars
- #46 : change query_frontend_log_queries_longer_than to String
Release 1.5.0
Features
- #37 : Remove unsed parameter block_sync_concurrency in Thanos Compactor
- #38 : fix receiver tsdb.path var name and add labels flag
- #40 : increase puppet-archive dependency to < 7.0.0
Release 1.4.0
Features
- Introducing a prefix parameter for the storage config , defaults to empty
Release 1.3.0
Features
- Support Thanos version 0.26.0
Bug Fixes
- Fix : systemctl daemon-reload after service file changed
Release 1.2.0
Features
- Support Thanos version 0.16.0
Release 1.1.0
Features
- Support Thanos version 0.15.0
Release 1.0.2
Bug Fixes
- Fix building package (remove useless folders)
Release 1.0.1
Bug Fixes
- Fix a bug into Sidecar default parameters
- Code optimization
Release 1.0.0
- First major release
Release 0.4.2
- Acceptance tests.
- Automatic deploy via the CI.
Release 0.4.1
Bug Fixes
- Fix Bucket Web service.
Release 0.4.0
Features
- Add Bucket Web service.
- Add Index Cache.
- Add new Query, Rule, Sidecar and Store parameters
Release 0.3.0
Features
- Add extra parameters to do compatible with future versions of Thanos binary.
Release 0.2.1
Bug Fixes
- User and group was not set in Service file.
- Service is notified when Service file changed.
- Set the default version to 0.10.1
Release 0.2.0
Features
- Storage and Tracing configuration
- Optimization and testings
Bug Fixes
- Service file creation with removing of useless new line return.
Release 0.1.4
Bug Fixes
- Service file correction with useless new line returns
Release 0.1.3
Features
- Unit tests
Bug Fixes
- Boolean parameters in service resource creation.
Release 0.1.2
Features
- Documentation, README and REFERENCE
Release 0.1.1
- Test release
Release 0.1.0
Features
- Installation and component's Service creation
Dependencies
- puppetlabs/stdlib (>= 6.2.0 < 7.0.0)
- puppet/archive (>= 4.4.0 < 7.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.