Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.
/ TSQ Public archive

Timeseries InfluxDB Lua abstraction

Notifications You must be signed in to change notification settings

tadpol/TSQ

Repository files navigation

#TSQ

Build Status rock version

An abstraction to help with formatting pickiness and paramater validations.

Built for the Timeseries storage service in Murano.

Install

You need to use either exosite or MrMurano

Using MrMurano

Clone or add as a submodule into the modules directory.

cd modules
git clone https://github.com/tadpol/TSQ 

OR

cd modules
git submodule add https://github.com/tadpol/TSQ

Using exosite

  • Edit Solutionfile.json to add tsq.lua
      ...
    "modules": {
        "tsq": "modules/tsq/tsq.lua"
    },
      ...
      

Example

local qq = TSQ.q():fields(TSF.new('temp'):mean())
qq:from('wintd')
qq:where_tag_is('sn', 3):OR_tag_is('sn', 5)
qq:AND_time_ago('1h')
qq:groupby('sn'):groupbytime('15m'):fill('prev'):limit(1)
local out = Timeseries.query{ epoch='ms', q = tostring(qq) }

About

Timeseries InfluxDB Lua abstraction

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages