Kaper

Build StatusCoverage StatusLicense

Elixir client for the Kapacitor REST API.

Installation

If available in Hex, the package can be installed as:

  1. Add kaper to your list of dependencies in mix.exs:

    def deps do

     [{:kaper, "~> 0.0.5"}]

    end

  2. Ensure kaper is started before your application:

    def application do

     [applications: [:kaper]]

    end

Configuration

Key Required? Example Description
url Yes http://0.0.0.0:9092 URL of Kapacitor endpoint
basic_auth_username No kapacitor_user Basic HTTP authentication username
basic_auth_password No password Basic HTTP authentication password

Example

  defmodule KapClient do
    use Kaper.Client, url: "http://0.0.0.0:9092"
  end

  defmodule BasicAuthKapClient do
    use Kaper.Client, url: "http://0.0.0.0:9092", basic_auth_username: "admin", basic_auth_password: "password"
  end