Forge Home

kapacitor

Manage kapacitor framework, an open source framework for processing, monitoring, and alerting on time series data

14,660 downloads

1,110 latest version

1.8 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

  • 1.0.9 (latest)
  • 1.0.8
  • 1.0.7
  • 1.0.6
  • 1.0.5
  • 1.0.4
  • 1.0.3
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 0.1.2
  • 0.1.1
  • 0.1.0
  • 0.0.16
  • 0.0.15
  • 0.0.14
  • 0.0.13
  • 0.0.12
  • 0.0.11
  • 0.0.10
  • 0.0.9
  • 0.0.8
  • 0.0.7
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Apr 24th 2017
This version is compatible with:
  • Puppet Enterprise 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 5.0.0

Start using this module

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

Add this module to your Puppetfile:

mod 'm4ce-kapacitor', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

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

Manually install this module globally with Puppet module tool:

puppet module install m4ce-kapacitor --version 0.1.1

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
Tags: kapacitor

Documentation

m4ce/kapacitor — version 0.1.1 Apr 24th 2017

Puppet types and providers for Kapacitor

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with the kapacitor module
  4. Reference - Types reference and additional functionalities
  5. Hiera integration
  6. Contact

This module implements native types and providers to manage some aspects of Kapacitor. The providers are fully idempotent.

The kapacitor module allows to automate the configuration and deployment of Kapacitor templates and tasks.

The module requires the kapacitor-ruby rubygem. It also requires Puppet >= 4.0.0.

If you are using Puppet AIO, you may want to include the gem as part of the base installation. If not, you can install it as follows:

/opt/puppetlabs/puppet/bin/gem install kapacitor-ruby

Furthermore, on your puppet master, you'd need to install the toml rubygem. If you use puppetserver, you can install it as follows:

puppetserver gem install toml

This is needed to generate Kapacitor's configuration file.

The include the main class as follows:

include kapacitor

Classes

kapacitor

kapacitor

include kapacitor
templates (optional)

Kapacitor templates in the form of {'template_name' => { .. }}

tasks (optional)

Kapacitor tasks in the form of {'task_name' => { .. }}

opts (optional)

Kapacitor daemon options in the form of {'option' => 'value'}.

Defaults to:

kapacitor::opts:
  hostname: "%{facts.networking.fqdn}"
  "skip-config-overrides": false
  "default-retention-policy": ""
  http:
    "bind-address": ":9092"
    "auth-enabled": false
    "log-enabled": true
    "write-tracing": false
    "pprof-enabled": false
    "https-enabled": false
  "config-override":
    enabled: true
  logging:
    file: "STDOUT"
    level: "INFO"
  replay:
    dir: "%{lookup('kapacitor::data_dir')}/replay"
  storage:
    boltdb: "%{lookup('kapacitor::data_dir')}/kapacitor.db"
  deadman:
    global: false
  smtp:
    enabled: false
    host: "localhost"
    port: 25
    username: ""
    password: ""
    "no-verify": false
    "idle-timeout": "30s"
    "global": false
    "state-changes-only": false
  slack:
    enabled: false
    global: false
    "state-changes-only": false
  opsgenie:
    enabled: false
  victorops:
    enabled: false
  pagerduty:
    enabled: false
  hipchat:
    enabled: false
  telegram:
    enabled: false
  sensu:
    enabled: false
  alerta:
    enabled: false
  reporting:
    enabled: false
  kubernetes:
    enabled: false
  talk:
    enabled: false
  stats:
    enabled: true
    "stats-interval": "10s"
    "database": "_kapacitor"
    "retention-policy": "autogen"
  udf:
    functions: {}
  collectd:
    enabled: false
  opentsdb:
    enabled: false
data_dir (optional)

Path to the Kapacitor data directory (default: /var/lib/kapacitor)

gem_dependencies (optional)

Rubygems dependencies for Kapacitor

Defaults to:

kapacitor::gem_dependencies:
  "kapacitor-ruby": {}
packages (optional)

Installation packages for Kapacitor

Defaults to:

kapacitor::packages:
  "kapacitor": {}
config_dir (optional)

Path to the Kapacitor configuration directory (default: /etc/kapacitor)

config_file (optional)

Path to the Kapacitor configuration file (default: /etc/kapacitor/kapacitor.conf)

config_file_manage (optional)

Whether we should manage Kapacitor's configuration file or not (default: true)

service_provider (optional)

Kapacitor service provider. Can be either 'default' or 'docker' (default: 'default')

service_opts (optional)

Kapacitor service options when using 'docker' as a provider.

service_name (optional)

Kapacitor service name (default: 'kapacitor')

service_manage (optional)

Whether we should manage the service runtime or not (default: true)

service_ensure (optional)

Whether the resource is running or not. Valid values are 'running', 'stopped'. (default: 'running')

service_enable (optional)

Whether the service is onboot enabled or not. Defaults to true.

Types

kapacitor_template

kapacitor_template manages Kapacitor templates

kapacitor_template {"template_name": }
name (required)

Template name

type (required)

The template type: stream or batch.

script (required)

The content of the script.

ensure (optional)

Whether the resource is present or not. Valid values are 'present', 'absent'. Defaults to 'present'.

kapacitor_task

kapacitor_task manages Kapacitor tasks

kapacitor_task {"task_name": }
name (required)

Task name

template_id (optional)

An optional ID of a template to use instead of specifying a TICKscript and type directly.

dbrps (required)

List of database retention policy pairs the task is allowed to access.

type (optional)

The task type: stream or batch.

script (optional)

The content of the script.

vars (optional)

A set of vars for overwriting any defined vars in the TICKscript.

enable (optional)

Whether the task is enabled or not.

ensure (optional)

Whether the resource is present or not. Valid values are 'present', 'absent'. Defaults to 'present'.

You can optionally define your Kapacitor tasks and templates.

---
kapacitor::templates:
  "cpu_template":
    type: "stream"
    script: "stream\n    |from()\n        .measurement('cpu')\n"
    ensure: "present"
kapacitor::tasks:
  "cpu_task":
    template_id: "cpu_template",
    dbrps:
      - db: "telegraf"
        rp: "autogen"
    enable: true
    ensure: "present"