Open source framework for processing, monitoring, and alerting on time series data
Go Python Shell
Clone or download
Permalink
Failed to load latest commit information.
.circleci remove deprecated reusable config Apr 17, 2018
.github add .github and .gitattributes May 31, 2016
.hooks Use Go vendoring for deps. Using govend tool. Apr 13, 2016
alert add alert inhibitors Mar 21, 2018
auth ensure unique and safe mapping from db name to db resource (#802) Aug 10, 2016
bufpool reverting bufpool Oct 26, 2017
client Cleanup and consistent use of Note format Mar 20, 2018
clock influxdb->influxdata Jan 7, 2016
cmd Merge branch 'v1.4' Mar 14, 2018
command add alert service API Jan 5, 2017
edge add alert inhibitors Mar 21, 2018
etc Update kapacitor.conf May 10, 2018
examples Add example of all nodes in load tasks style dir Oct 17, 2017
expvar Convert all nodes to use message passing semantics. Jul 31, 2017
influxdb Use http.ProxyFromEnvironment where appropriate May 3, 2017
integrations Merged pull request #1940 from onlynone/pagerduty2_routingKey Aug 6, 2018
keyvalue Refactor logging with diagnostics Sep 18, 2017
listmap Add initial scraping of prometheus targets Apr 29, 2017
models Convert all nodes to use message passing semantics. Jul 31, 2017
pipeline Merged pull request #1940 from onlynone/pagerduty2_routingKey Aug 6, 2018
scripts update package scripts Nov 8, 2017
server Fix KafkaTopic not working from TICKScript Jun 25, 2018
services Merged pull request #1940 from onlynone/pagerduty2_routingKey Aug 6, 2018
tick fix autogen docs comments May 9, 2018
timer fixes #387 #400 #401 Apr 4, 2016
tlsconfig allow multiple mqtt clients, add tests for alert handling Jul 24, 2017
udf testing code for compatability with protobuf 3.4.0, regenerated test … Jun 29, 2018
usr/share/bash-completion/completions Add HTTP logging API Oct 10, 2017
uuid switch to using UUIDs directly Mar 16, 2017
vendor fix(services/alert): Improve JSON serialization performance Jun 20, 2018
waiter add logic to update subscriptions when the cluster ID changes. Jun 2, 2017
.dockerignore User Defined Functions (UDFs) Jan 15, 2016
.gitattributes add .github and .gitattributes May 31, 2016
.gitignore Use Go vendoring for deps. Using govend tool. Apr 13, 2016
BLOB_STORE_DESIGN.md [WIP] Initial blob store design doc (#905) Sep 21, 2016
CHANGELOG.md update changelog for 1.5.1 Aug 6, 2018
CONTRIBUTING.md initial commit, support for pagerduty API v2 Mar 9, 2018
DESIGN.md Propose small spelling changes Feb 1, 2018
Dockerfile_build_ubuntu32 testing code for compatability with protobuf 3.4.0, regenerated test … Jun 29, 2018
Dockerfile_build_ubuntu64 testing code for compatability with protobuf 3.4.0, regenerated test … Jun 29, 2018
Gopkg.lock fix(services/alert): Improve JSON serialization performance Jun 20, 2018
Gopkg.toml fix(services/alert): Improve JSON serialization performance Jun 20, 2018
LICENSE Initial commit Aug 31, 2015
LICENSE_OF_DEPENDENCIES.md pr(services/alert): Changes based on PR feedback Jun 21, 2018
README.md Add tickscipts for telegraf (#780) Aug 8, 2016
alert.go Merge branch 'master' into pagerduty2_routingKey Jul 3, 2018
autoscale.go add alert inhibitors Mar 21, 2018
barrier.go add alert inhibitors Mar 21, 2018
batch.go Refactor logging with diagnostics Sep 18, 2017
build.py pr(kapacitor): Add command to install easyjson tool Jun 21, 2018
build.sh have build.sh and test.sh copy build results back out to ./build/ Jun 1, 2017
change_detect.go add alert inhibitors Mar 21, 2018
circle-test.sh switch to circleci 2.0 May 25, 2017
circle.yml Package UDF Agents (#706) Jul 9, 2016
combine.go add alert inhibitors Mar 21, 2018
combine_test.go add |combine method (#693) Jul 2, 2016
default.go add alert inhibitors Mar 21, 2018
delete.go add alert inhibitors Mar 21, 2018
derivative.go add alert inhibitors Mar 21, 2018
doc.go rename DSL to TICKscript Oct 22, 2015
edge.go Refactor logging with diagnostics Sep 18, 2017
eval.go add alert inhibitors Mar 21, 2018
expr.go Convert all nodes to use message passing semantics. Jul 31, 2017
flatten.go add alert inhibitors Mar 21, 2018
gobuild.sh add test.sh for testing various envs Feb 5, 2016
group_by.go add alert inhibitors Mar 21, 2018
http_out.go add alert inhibitors Mar 21, 2018
http_post.go add alert inhibitors Mar 21, 2018
influxdb_out.go add alert inhibitors Mar 21, 2018
influxql.gen.go Convert all nodes to use message passing semantics. Jul 31, 2017
influxql.gen.go.tmpl Convert all nodes to use message passing semantics. Jul 31, 2017
influxql.go add alert inhibitors Mar 21, 2018
join.go Refactor logging with diagnostics Sep 18, 2017
kapacitor_loopback.go add alert inhibitors Mar 21, 2018
list-deps remove govend deps (#632) Jun 10, 2016
log.go add alert inhibitors Mar 21, 2018
metaclient.go Update the InfluxDB dep to 1.1 (#991) Oct 26, 2016
node.go add .quiet to all nodes Mar 14, 2018
noop.go Refactor logging with diagnostics Sep 18, 2017
output.go Uses cases working: window, mr, alerting, and join/groupby both Oct 2, 2015
query.go Add new query property for aligning group by intervals to start times Jan 11, 2017
query_test.go Add new query property for aligning group by intervals to start times Jan 11, 2017
replay.go Convert all nodes to use message passing semantics. Jul 31, 2017
result.go Miscellaneous lint cleanup Jan 10, 2017
sample.go add alert inhibitors Mar 21, 2018
shift.go add alert inhibitors Mar 21, 2018
sideload.go add alert inhibitors Mar 21, 2018
state_tracking.go add alert inhibitors Mar 21, 2018
stats.go Refactor logging with diagnostics Sep 18, 2017
stream.go add alert inhibitors Mar 21, 2018
task.go add .quiet to all nodes Mar 14, 2018
task_master.go add kafka alert handler Mar 21, 2018
template.go Adds Template Tasks (#577) May 31, 2016
test.sh have build.sh and test.sh copy build results back out to ./build/ Jun 1, 2017
tickdoc.conf fix autogen docs comments May 9, 2018
tmpldata.json fix bug where aggregate operations could not change type Apr 12, 2017
udf.go Refactor logging with diagnostics Sep 18, 2017
udf_test.go Refactor logging with diagnostics Sep 18, 2017
union.go Refactor logging with diagnostics Sep 18, 2017
update_tick_docs.sh update docs and tickdoc to use config Mar 25, 2016
where.go add alert inhibitors Mar 21, 2018
window.go add alert inhibitors Mar 21, 2018
window_test.go Refactor logging with diagnostics Sep 18, 2017

README.md

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 use 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

For more complete examples see the documentation.