ovh / tsl Goto Github PK
View Code? Open in Web Editor NEWTSL is a HTTP proxy which generate WarpScript or a PromQl script based on a TSL query.
License: BSD 3-Clause "New" or "Revised" License
TSL is a HTTP proxy which generate WarpScript or a PromQl script based on a TSL query.
License: BSD 3-Clause "New" or "Revised" License
I'd like to be able to set a new label from series names so I can use it in the query (for example with groupBy
)
Example :
select(my.awesome.series.name.*.count)
.where(...)
.setLabelFromName("verb")
.groupBy(verb, mean)
select(my.awesome.series.name.*.count)
.where(...)
.extractLabelFromName("verb","~MyRegex")
.groupBy(verb, mean)
Current behaviour:
Make a TSL query a bad token, the response code will be 200 but the body says (in HTML): ...bad token..
Expected: TSL should return an errored status code (500 / 418 / ...)
Line 251 in 7ee52b5
I'm just asking, is this noteworthy project still being maintained? Thanks a lot.
Error with Native variable
They can't be interpreted with ${} in TSL script in Grafana
It seems the ANTLR grammar file is not used by the project which instead uses a handcrafted parser, as a consequence, the grammar file does not seem to be updated whenever the features of the language evolve thus preventing implementations which rely on the ANTLR4 grammar to be up to date.
As an example, functions such as fill and fillValue are not present in the ANTLR files.
Are there any plans to actually use the grammar file for the go implementation so it would be kept up to date?
While executing this query on Quantum :
$RTOKEN
<'
select(*)
'>
TSL
I encountered this error :
ERROR line #9: Exception at '=>TSL<=' in section [TOP] (Line #4 (Exception at '[ 'token' =>~.*<= {} ] FIND' in section [TOP] (Unknown function '~.*')))
This should work as indicated here : https://github.com/ovh/tsl/blob/master/spec/doc.md#select
This is more a question rather than an issue.
I have seen in the roadmap that an implementation independent from the back-end is foreseen. Has an implementation on top of python pandas been considered? Would it make senses according to you?
Thanks in anticipation for your response.
TSL already have .renameBy()
function which allow us to rename a series with its labels.
For some use case, it could be interesting have template the name with a very custom string.
Can we extend .renameBy()
function with the following behaviour ?
select('os.cpu').renameBy('${this.labels.hostname} (${this.labels.datacenter})' )
// produce a series named: "1.server.front (GRA)"
When I draw a graph with the result of a TSL query, I often need to add a custom series which can be for example an upper limit.
Is it possible to do it in TSL to perform the two operations at the same time
Exemple:
create(series('metrics.service.mads').setLabels('service=abcd').addValue(now, 150).addValue(now - 1h, 150)...)
When using a
.from(start, to=end).sampleBy(1m, mean)
is failing
Hello,
when I get mutiple series, I cannot predict how the list of series will be sorted. I would like to be able to sort the list of series based on the name or a label of the series.
This way I am sure series will always be displayed in the same order in Grafana.
Thank you,
Tristan
'test' 'name' STORE
''
<'
create(series(name))
'>
TSL
Fails
Following #43, that could be nice to provide an npm package to integrate this project easily in a frontend project.
According to creating-node-js-modules from npm documentation, creating a package seem to be simple.
The requirements are:
main
entrywasm
... but maybe isn't a good idea and we should let people this "custom" task and just provide an empty main.js
Missing percentiles and join aggregators
curl -d "select('requests_latency_seconds_count').where('role=0').from('2019-01-31T00:00:00+01:00',to='2019-02-01T00:00:00+01:00').finite().sampleBy(1h,last).group(sum).window(delta, 0, 1)" https://DESC:[email protected]/v0/query
{"error":"Cannot parsed query: Error when parsing "to" in "from" function, this variable isn't declared at line 1, char 91"}
quick fix resolution (removing the to= instruction) see below:
curl -d "select('requests_latency_seconds_count').where('role=0').from('2019-01-31T00:00:00+01:00', '2019-02-01T00:00:00+01:00').finite().sampleBy(1h,last).group(sum).window(delta, 0, 1)" https://DESC:[email protected]/v0/query
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.