Giter Club home page Giter Club logo

agalon's Introduction

Agalon

The goal of Agalon is to be able to run TSL queries on multiple Time Series databases.

We choose to start with Influx, but Prometheus and OpenTSDB will come soon!

Agalon load in Memory the native raw data, then apply the TSL queries using WarpScript™ as run time analysis!

The JAVA quarkus project was used to quickly bootstrap a REST API.

Compile and test

You can build Agalon with

gradle quarkusBuild

And run it with

java -XX:TieredStopAtLevel=1 -Xverify:none -Djava.util.logging.manager=org.jboss.logmanager.LogManager -jar  build/agalon-0.0.1-SNAPSHOT-runner.jar 

Agalon is currently a PoC, improvement are coming! Any feedback or contribution are welcomed!

TSL properties

Agalon require only a path to a TSL.so library and optionally the time units of the TSL query results. To configure it, edit the src/main/resources/application.properties file.

#
# TSL SO library path
#
tsl.libso.path = /Path/to/tsl.so

#
# TSL time units of the query result
# ns means we store nanoseconds
# us means we store microseconds
# ms means we store milliseconds
#
# tsl.result.timeunits = us

Influx properties

TSL is fully supported on an Influx DataBase. The Influx URL, the influx database as well as the output separtor format (between measurements and fields) are configurable.

To configure an Influx source you can edit the src/main/resources/application.properties file.

#
# Influx Query URL
#
source.influx.query.url = http://127.0.0.1:8086

#
# Influx Query database
#
source.influx.query.database = telegraf

#
# Influx results separator (series names)
#
source.influx.result.separator = .

TSL queries

Once TSL is well configured and running, it's now time to do some TSL queries. Let's start with one which will create series and sample them.

curl --request POST \
  --url http://0.0.0.0:8080/api/v0/tsl \
  --data '
create(series('\''1'\'').setLabels(["l0=42","l1=42"]).setValues(1575914640000000, [-5m, 2], [0, 1]).setValues(1575914640000000,[2m, 3]),series("test2").setLabels(["l0=40","l2=41"]).setValues(1575914640000000, [-5m, 2], [0, 1]))
	 .sampleBy(2m, max)'

Then, as example let's run a find and a fetch queries on the Influx backend specified in the configuration. At the moment a TSL basic authentication is used to connect to Influx (user, password). Even if no user are set on a local Influx for example, a basic authentication is currently required.

# TSL Find on an Influx backend
curl --request POST \
  --url http://u:[email protected]:8080/api/v0/tsl \
  --data 'select("disk").where("mode=rw")'

# TSL Fetch on an Influx backend
curl --request POST \
  --url http://u:[email protected]:8080/api/v0/tsl \
  --data 'select("disk").where("mode=rw").last(20m).sampleBy(5m,max)'

If you want to learn more of the TSL syntax, you can check the query doc.

## Licence

Agalon is released under a 3-BSD clause license.

Get in touch

If you have any questions or want to share about TSL or Agalon, we will be to chat on gitter.

agalon's People

Contributors

stevenleroux avatar

Watchers

 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.