Giter Site home page Giter Site logo

kapacitor-configmap-listener's Introduction

kapacitor-configmap-listener

A shuttle application to move ConfigMaps into Kapacitor. This uses the informer framework for watch notification against the Kubernetes API.

Build Status

Lead Maintainer: Lam Chan

Introduction

Kapacitor is a data calculator designed around TICK script. These scripts can be used to create alerts and events based off of custom thresholds. Currently, there is no absolute way to set up the TICK environment. Kubernetes allows for easy boot strapping of containers into a hosting environment. But there is no easy way to feed Kapacitor TICK scripts to scale containers per deployment. Also, the subscription binding mechanism between Kapacitor and InfluxDB is less than desirable with the lack of orphaned subscription cleanup. This controller is a solution to solve these sets of problem

What does it do?

In short, this controller listens to the Kubernetes State for ConfigMap changes. Any changes will be replicated to Kapacitor.

Operations

  • Delete all InfluxDB subscriptions
    • Any subscriptions that are still used will automatically regenerate
  • On start, collects all filtered ConfigMaps from Kubernetes
    • Filtered applied is base on prefix name matching on the ConfigMap name property
  • The initial list of ConfigMaps are upserted to Kapacitor as task
  • All future ConfigMap changes are listened on and translated to the appropriate create, update, delete task comands to Kapacitor.
  • When Kapacitor falls over and loses all tasks when new container is started
    • Will detect the fall over and reseed kapacitor with desired state from config map
    • Will remove all InfluxDB subscriptions to ensure no subscriptions are orphaned.

Installation

This installation guide assumes go and glide is installed

go get github.com/xogroup/kapacitor-configmap-listener
cd $GOPATH/src/github.com/xogroup/kapacitor-configmap-listener
glide install
go build

Or using Docker

docker pull xogroup/kapacitor-configmap-listener

Usage

kapacitor-configmap-listener -kapacitorurl http://xyz.com:9092

# or

KAPACITOR_URL=http://xyz.com:9092 kapacitor-configmap-listener

Or using Docker

docker run -d xogroup/kapacitor-configmap-listener -kapacitorurl http://xyz.com:9092

# or

docker run -d -e KAPACITOR_URL=http://xyz.com:9092 xogroup/kapacitor-configmap-listener

Dependencies

Documentation

Diagrams

Look at the Diagrams.

API

See the API Reference.

Contributing

We love community and contributions! Please check out our guidelines before making any PRs.

Setting up for development

  1. Clone this project and cd into the project directory
  2. Run the commands below
glide install
go build

kapacitor-configmap-listener's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.