io.ovh:tslToWarpScript

Installation

$ wf g -w /path/to/warp10 io.ovh tslToWarpScript

/path/to/warp10/ is where Warp 10 is physically located.

Readme

TSL in WarpScript

Extension to load TSL as a WarpScript function

Warp 10™ Modules

This repository contains a template for creating Warp 10™ modules such as extensions, plugins, authentication plugins or macro packages.

After cloning this repo, you must initialize it with informations related to your module, namely:

  • The module group, this is the maven groupId under which your module will be published
  • The module artifact, this is the artifactId of your published module
  • The module initial version
  • The module description

Such an initialization is performed using gradlew:

./gradlew bootstrap -Pg=group -Pa=artifact -Pv=x.y.z -Pd='description of your module'

The TSL extension

The tsl extension add the possibility to request a Warp 10 directly in WarpScript using TSL queries.

Set up

Build the TSL jar and add it as an extension

warpscript.extensions = io.ovh.metrics.warp10.script.ext.tsl.TSLWarpScriptExtension

You will need to have the TSL C libraries. They can be compiled from the TSL project. TSL now includes debian so library in its release section.

Config

The Tsl extension expects to find the tsl.so library. First you need to build a TSL.so adapted to your system. Then you can set in the Warp10 config file the path to find the tsl.so lib.

warpscript.tsl.libso.path = /Path/to/tsl.so

Optionally, you can set the TSL error prefix which used by the TSL.so lib:

warpscript.tsl.error.prefix = "error -"

For TSL version 0.0.5, the prefix to use is error -.

Execute

TSL expects to find on top of the stack simply two arguments:

  • a Warp 10 READ TOKEN (can be empty if no token used in TSL query)
  • a TSL query as Warp 10 string

A small example:

// Ex1
''
'create(series("test"))'
TSL

// Ex2
'TOKEN'
<'
select("os.cpu")
   .where("host=test")
   .last(5m)
'>
TSL

License

TSL in WarpScript is release with a BSD 3-Clause license.

Author
Avatar

Aurélien Hébert

aurelien.hebert@ovh.corp.com

Version

0.0.2-uberjar

Type

Extension

Last published

2019-11-05

License

BSD 3-Clause license

Downloads
Repository

Github

Tags
tsl query
Path Size Creation time
  TSL 1199 bytes 2019-10-23

Configuration

TSL libso path

warpscript.tsl.libso.path = /Path/to/tsl.so

Prefix for TSL translation errors in libso

warpscript.tsl.error.prefix = "error -"
Versions Published
0.0.2-uberjar 2019-11-05
0.0.1-uberjar 2019-10-23