Forge Home

kapacitor

Module to manage Kapacitor

720 downloads

720 latest version

4.7 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Jan 31st 2022
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
  • Puppet >= 5.5.8 < 7.0.0
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'kogitoapp-kapacitor', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add kogitoapp-kapacitor
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install kogitoapp-kapacitor --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

kogitoapp/kapacitor — version 0.1.0 Jan 31st 2022

Puppet module to manage Kapacitor

Table of Contents

  1. Description
  2. Setup - The basics of getting started with kapacitor
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

Installs, configures and manages the Kapacitor, which processes, monitores, and alerts on time series data.

Setup

What kapacitor affects

Default configuration

  • manages GPG key, repository (default: manage_repo = true)

    • default: repo_location = https://repos.influxdata.com/ and repo_type = 'stable'
  • manages package

  • manages directories and configuration files (referring to templates)

    • /etc/kapacitor/kapacitor.conf

    • Debian: /lib/systemd/system/kapacitor.service

    • CentOs: /etc/systemd/system/kapacitor.service

    • /etc/default/kapacitor

  • starts service "kapacitor" immediately (default: manage_service = true)

  • does not handle user/group, because both are handled by the package

Setup Requirements

This module requires the toml-rb gem. Either install the gem using puppet's native gem provider, puppetserver_gem, pe_gem, pe_puppetserver_gem, or manually using one of the following methods:

  # apply or puppet-master
  gem install toml-rb
  # PE apply
  /opt/puppetlabs/puppet/bin/gem install toml-rb
  # AIO or PE puppetserver
  /opt/puppet/bin/puppetserver gem install toml-rb

For an extensive list of requirements, see metadata.json.

Beginning with kapacitor

The module comes along with several configuration files (see templates). Change configuration settings in according hiera level or by using hashes.

  • kapacitor.conf.erb
  • service-defaults.erb - adds empty file
  • systemd.service.erb

Usage

Configuration

Please refer to Kapacitor documentation for the defaults used.

Change basic configuration setting via the according variables. For topics like "kubernetes", "smtp", etc. use hiera or hashes. "http" comes with an obligatory default setting, which is merged in case of:

Hash $configuration_http_obligatory = {
    'bind-address' => ':9092',
    'log-enabled' => true,
    'write-tracing' => false,
    'pprof-enabled' => false,
    'https-enabled' => false,
  }

Other directories and bolt db

Manage and change the defaults

parameter default manage via
data_dir /var/lib/kapacitor data_dir_manage [directory,absent]
load_dir /etc/kapacitor/load load_dir_manage [directory,absent]
replay_dir /var/lib/kapacitor/replay replay_dir_manage [directory,absent]
task_dir /var/lib/kapacitor/tasks task_dir_manage [directory,absent]
storage_boltdb /var/lib/kapacitor/kapacitor.db storage_boltdb_manage [present,absent]

In combination with other influxdata module

  • when one of the other influxdata modules already handles GPG keys and repository
class { 'kapacitor':
  manage_repo => false,
}
  • when kapacitor shall handle GPG keys and repository
class { 'kapacitor':
  manage_repo => true,
}

Example

class { 'kapacitor':
  manage_repo            => false,
  configuration_influxdb => {
    influxdb => [{
      'name'     => 'localhost',
      'password' => '',
      'timeout'  => 0,
      'urls'     => ['http://localhost:8086',],
      'username' => '',
      'default'  => true,
      'enabled'  => true,
    }],
  },
  configuration_http     => {
    'auth-enabled' => true,
  },
  configuration_tls      => {
    ciphers       => [
      'TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305',
      'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256',
    ],
    'min-version' => 'tls1.2',
    'max-version' => 'tls1.2',
  }
}

Reference

Please see document REFERENCE.md.

Limitations

For an extensive list of supported operating systems, see metadata.json.

Development

  • pdk-version 1.18.1
  • template-url pdk-default 1.18.1
  • template-ref tags/1.18.1-0-g3d2e75c

Release Notes/Contributors/Etc.