Categorygithub.com/influxdata/kapacitor
modulepackage
1.7.6
Repository: https://github.com/influxdata/kapacitor.git
Documentation: pkg.go.dev

# README

Kapacitor Circle CI Docker pulls

Open source framework for processing, monitoring, and alerting on time series data

Installation

Kapacitor has two binaries:

  • kapacitor – a CLI program for calling the Kapacitor API.
  • kapacitord – the Kapacitor server daemon.

You can either download the binaries directly from the downloads page or go get them:

go get github.com/influxdata/kapacitor/cmd/kapacitor
go get github.com/influxdata/kapacitor/cmd/kapacitord

Configuration

An example configuration file can be found here

Kapacitor can also provide an example config for you using this command:

kapacitord config

Getting Started

This README gives you a high level overview of what Kapacitor is and what its like to use it. As well as some details of how it works. To get started using Kapacitor see this guide. After you finish the getting started exercise you can check out the TICKscripts for different Telegraf plugins.

Basic Example

Kapacitor uses a DSL named TICKscript to define tasks.

A simple TICKscript that alerts on high cpu usage looks like this:

stream
    |from()
        .measurement('cpu_usage_idle')
        .groupBy('host')
    |window()
        .period(1m)
        .every(1m)
    |mean('value')
    |eval(lambda: 100.0 - "mean")
        .as('used')
    |alert()
        .message('{{ .Level}}: {{ .Name }}/{{ index .Tags "host" }} has high cpu usage: {{ index .Fields "used" }}')
        .warn(lambda: "used" > 70.0)
        .crit(lambda: "used" > 85.0)

        // Send alert to hander of choice.

        // Slack
        .slack()
        .channel('#alerts')

        // VictorOps
        .victorOps()
        .routingKey('team_rocket')

        // PagerDuty
        .pagerDuty()

Place the above script into a file cpu_alert.tick then run these commands to start the task:

# Define the task (assumes cpu data is in db 'telegraf')
kapacitor define \
    cpu_alert \
    -type stream \
    -dbrp telegraf.default \
    -tick ./cpu_alert.tick
# Start the task
kapacitor enable cpu_alert

# Packages

Alert provides a framework for tracking events in a publish subscribe system.
No description provided by the author
No description provided by the author
No description provided by the author
A clock that provides blocking calls that wait until absolute times have occurred.
No description provided by the author
No description provided by the author
Package edge provides mechanisms for message passing along edges.
This package is a fork of the golang expvar expvar.Var types.
No description provided by the author
No description provided by the author
Contains integration and end-to-end tests.
No description provided by the author
No description provided by the author
Provides a set of structures for passing data around Kapacitor.
Provides an API for constructing data processing pipelines.
Provides a server type for starting and configuring a Kapacitor server.
No description provided by the author
No description provided by the author
TICKscript is a simple invocation chaining DSL.
No description provided by the author
No description provided by the author
No description provided by the author
Package uuid generates and parses UUIDs.
No description provided by the author

# Functions

No description provided by the author
No description provided by the author
EvalPredicate - Evaluate a given expression as a boolean predicate against a set of fields and tags.
No description provided by the author
Create a new task from a defined kapacitor.
No description provided by the author
No description provided by the author
No description provided by the author
Create a new Executor with a given clock.
No description provided by the author
No description provided by the author
No description provided by the author
Replay batch data from a channel source.
Replay batch data from an IO source.
Replay stream data from a channel source.
Replay stream data from an IO source.
Unmarshal a Result object from JSON.
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CircularQueue defines a circular queue, always use the contructor to create one.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A task that is ready for execution.
No description provided by the author
No description provided by the author
FluxQueryNode is a node for making flux queries.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MaxDuration is a 64-bit int variable representing a duration in nanoseconds,that satisfies the expvar.Var interface.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The complete definition of a task, its id, pipeline and type.
An execution framework for a set of tasks.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
User defined function.
UDFProcess wraps an external process and sends and receives data over STDIN and STDOUT.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A node that can be in an executor.
No description provided by the author
An output of a pipeline.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

The result from an output.
The type of a task.