1.0.1 • Published 3 years ago
node-metricsql v1.0.1
node-metricsql
Native node binding for MetricsQL Parser
Build Module
make
Usage
const metricsql = require('node-metricsql');
const parsed = metricsql.parse(promql);
Test Module
node example.js 'sum(rate(foo{bar="baz"}[5m]))'
{
"Name":"sum",
"Args":[
{
"Name":"rate",
"Args":[
{
"Expr":{
"LabelFilters":[
{
"IsNegative":false,
"IsRegexp":false,
"Label":"__name__",
"Value":"foo"
},
{
"IsNegative":false,
"IsRegexp":false,
"Label":"bar",
"Value":"baz"
}
]
},
"Window":"5m",
"Offset":"",
"Step":"",
"InheritStep":false
}
]
}
],
"Modifier":{
"Args":[
"x",
"y"
],
"Op":"by"
}
}
Todo
- go binding
- function mapping
- format conversion
1.0.1
3 years ago