Giter Site home page Giter Site logo

fluxter's Introduction

Fluxter

Build Status Hex Version

Fluxter is an InfluxDB writer for Elixir. It uses InfluxDB's line protocol over UDP.

Note: if you're using Erlang 19 or greater, you need Fluxter 0.4.0 or greater otherwise metrics reporting will (silently) not work because of network driver changes happened between Erlang 18 and Erlang 19.

Installation

Add Fluxter as a dependency to your mix.exs file:

def application() do
  [applications: [:fluxter]]
end

defp deps() do
  [{:fluxter, "~> 0.4"}]
end

Then run mix deps.get in your shell to fetch the dependencies.

Usage

A module that uses Fluxter becomes an InfluxDB connection pool:

defmodule MyApp.Fluxter do
  use Fluxter
end

Each Fluxter pool provides a start_link/0 function that starts the pool and connects to InfluxDB; this function needs to be invoked before the pool can be used. Usually, you won't call start_link/0 directly as you'll want to use a Fluxter pool as part of your application's supervision tree. For example:

def start(_type, _args) do
  import Supervisor.Spec

  children = [
    supervisor(MyApp.Fluxter, []),
    #...
  ]
  Supervisor.start_link(children, strategy: :one_for_one)
end

Once the Fluxter pool is started, its write/2,3 and measure/2,3,4 functions can successfully be used to send points to the data store.

Much more information can be found in the documentation.

License

This software is licensed under the ISC license.

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.