This module automates the install of Thanos and it's components into a service.
Maximum tested version of Thanos : 0.15.0
For more information see REFERENCE.md.
class { 'thanos':
  version => '0.15.0'
}include thanosthanos::version: '0.15.0'thanos::manage_sidecar: truethanos::manage_query: true
thanos::query::stores:
  - 'sidecar:10901'
  - 'store:10901'thanos::manage_query_frontend: truethanos::manage_rule: true
thanos::rule::queries:
  - 'query:10901'thanos::manage_store: truethanos::manage_compact: truethanos::manage_receive: truethanos::manage_tools_bucket_web: trueFor more configuration information see Thanos Storage configuration page.
thanos::storage { '/etc/thanos/storage.yaml':
  ensure => 'present',
  type   => 'FILESYSTEM',
  config => {
    directory => '/data'
  }
}include thanosthanos::manage_storage_config: true
thanos::storage_config_file: '/etc/thanos/storage.yaml'
thanos::storage_config:
  ensure: 'present'
  type: 'FILESYSTEM'
  config:
    directory: '/data'For more configuration information see Thanos Tracing configuration page.
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,
  }
}include thanosthanos::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: 0thanos::base_url: 'http://my_private_dropbox/thanos'Or
thanos::download_url: 'http://my_private_dropbox/thanos/thanos-0.10.1.tar.gz'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::stores:
  - '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'I recommend to use the module puppet-prometheus, it is very easy to use.
include prometheus
include thanosprometheus::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'Only support, Thanos supported OS. See Thanos releases page
See Contributing.
This project contains tests for rspec-puppet.
Quickstart to run all linter and unit tests:
bundle install --path .vendor/
bundle exec rake testOr
pdk validate
pdk test unit