All Projects → gpestana → Kapacitor Unit

gpestana / Kapacitor Unit

Licence: mit
Testing framework for Kapacitor TICKscripts

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Kapacitor Unit

Openwisp Monitoring
Network monitoring system written in Python and Django, designed to be extensible, programmable, scalable and easy to use by end users: once the system is configured, monitoring checks, alerts and metric collection happens automatically.
Stars: ✭ 37 (-50%)
Mutual labels:  influxdb
Raspberry pi stats
A script to collect various Raspberry Pi statistics, which are sent via Telegraf to InfluxDB.
Stars: ✭ 50 (-32.43%)
Mutual labels:  influxdb
Inch
An InfluxDB benchmarking tool.
Stars: ✭ 57 (-22.97%)
Mutual labels:  influxdb
Influx Prompt
An interactive command-line InfluxDB cli with auto completion.
Stars: ✭ 42 (-43.24%)
Mutual labels:  influxdb
Ssh Log To Influx
Send SSH authentication logs to influxdb with geohashing IP
Stars: ✭ 49 (-33.78%)
Mutual labels:  influxdb
Personal Influxdb
Import data from various APIs into InfluxDB
Stars: ✭ 51 (-31.08%)
Mutual labels:  influxdb
Solarthing
Monitors an Outback MATE and a Renogy Rover - MPPT Charge Controller. Integrates with Grafana, PVOutput and more!
Stars: ✭ 33 (-55.41%)
Mutual labels:  influxdb
Pytelegraf
Python client for sending metrics to Telegraf
Stars: ✭ 69 (-6.76%)
Mutual labels:  influxdb
Influx Crypto Trader
Node js trading bot, let you create trading strategy and run it (backtest/simulation/live)
Stars: ✭ 49 (-33.78%)
Mutual labels:  influxdb
Nagflux
A connector which copies performancedata from Nagios / Icinga(2) / Naemon to InfluxDB
Stars: ✭ 55 (-25.68%)
Mutual labels:  influxdb
Influx dashboards
Chronograf Dashboards for use with data produced by Telegraf input plugins.
Stars: ✭ 44 (-40.54%)
Mutual labels:  influxdb
Docker Flask Mongodb Example
Uses docker compose with a python flask microservice and MongoDB instance to make a sample application
Stars: ✭ 49 (-33.78%)
Mutual labels:  influxdb
Influxdb Haskell
InfluxDB client library for Haskell
Stars: ✭ 51 (-31.08%)
Mutual labels:  influxdb
Grade
Track Go benchmark performance over time by storing results in InfluxDB
Stars: ✭ 41 (-44.59%)
Mutual labels:  influxdb
Facette
Time series data visualization software
Stars: ✭ 1,115 (+1406.76%)
Mutual labels:  influxdb
Ansible Influxdb
Ansible Galaxy InfluxDB Role
Stars: ✭ 36 (-51.35%)
Mutual labels:  influxdb
Go Web Backend
Dockerized backend services for web application
Stars: ✭ 50 (-32.43%)
Mutual labels:  influxdb
Graylog Plugin Metrics Reporter
Graylog Metrics Reporter Plugins
Stars: ✭ 71 (-4.05%)
Mutual labels:  influxdb
Influxdbclient Rs
A easy-use client to influxdb
Stars: ✭ 63 (-14.86%)
Mutual labels:  influxdb
Unifi Poller
Application: Collect ALL UniFi Controller, Site, Device & Client Data - Export to InfluxDB or Prometheus
Stars: ✭ 1,050 (+1318.92%)
Mutual labels:  influxdb

Kapacitor-unit

A test framework for TICKscripts

Build Status Release Version

Kapacitor-unit is a testing framework to make TICK scripts testing easy and automated. Testing with Kapacitor-unit is as easy as defining the test configuration saying which alerts are expected to trigger when the TICK script processes specific data.

Read more about the idea and motivation behind kapacitor-unit in this blog post

Show me Kapacitor-unit in action!

usage-example

Features

✔️ Run tests for stream TICK scripts using protocol line data input

✔️ Run tests for batch TICK scripts using protocol line data input

🔜 Run tests for stream and batch TICK scripts using recordings

Requirements:

In order for all features to be supported, the Kapacitor version running the tests must be v1.3.4 or higher.

Running kapacitor-unit:

  1. Install kapacitor-unit and run
 $ make install
 $ make build-cmd

 $ make run  	# same as ./cmd/kapacitor-unit/kapacitor-unit

You can add ./cmd/kapacitor-unit/kapacitor-unit to your $PATH so you can easily call the kapacitor-unit executable anywhere.

  1. Define the test configuration file (see below)

  2. Run the tests

kapacitor-unit --dir <*.tick directory> --kapacitor <kapacitor host> --influxdb <influxdb host> --tests <test configuration path>

Test case definition:

# Test case for alert_weather.tick
tests:
  
   # This is the configuration for a test case. The 'name' must be unique in the
   # same test configuration. 'description' is optional

  - name: Alert weather:: warning
    description: Task should trigger Warning when temperature raises about 80 

    # 'task_name' defines the name of the file of the tick script to be loaded
    # when running the test
    task_name: alert_weather.tick

    db: weather
    rp: default 
    type: stream

     # 'data' is an array of data in the line protocol
    data:
      - weather,location=us-midwest temperature=75
      - weather,location=us-midwest temperature=82

    # Alert that should be triggered by Kapacitor when test data is running 
    # against the task
    expects:
      ok: 0
      warn: 1
      crit: 0


  - name: Alert no. 2 using recording
    task_id: alert_weather.tick
    db: weather
    rp: default 
    type: stream
    recordind_id: 7c581a06-769d-45cb-97fe-a3c4d7ba061a
    expects:
      ok: 0
      warn: 1
      crit: 0


  - name: Alert no. 3 - Batch
    task_id: alert_weather.tick
    db: weather
    rp: default 
    type: batch
    data:
      - weather,location=us-midwest temperature=80
      - weather,location=us-midwest temperature=82
    expects:
      ok: 0
      warn: 1
      crit: 0

Contributions:

Fork and PR and use issues for bug reports, feature requests and general comments.

©️ MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].