victoriametrics / metricsql Goto Github PK
View Code? Open in Web Editor NEWStandalone PromQL and MetricsQL parser
License: Apache License 2.0
Standalone PromQL and MetricsQL parser
License: Apache License 2.0
We want set dynamic time duration when generate recoding rules, support using variable during e.g.
related issue: dynamic time duration
When I use PushdownBinaryOpFilters
Example:
sum(rabbitmq_queue_messages_unacknowledged)
change to
sum(rabbitmq_queue_messages_unacknowledged{job=''rabbitmq-exporter})
But before PushdownBinartOpFilters,I want remove the label of job
Example:
sum(rabbitmq_queue_messages_unacknowledged{job=''rabbitmq-exporter})
change to
sum(rabbitmq_queue_messages_unacknowledged)
Does this feature currently support it? It's really useful !
Describe the bug
When using WITH
templates, users can define variables with custom names:
WITH(
now = sum(rate(my_metric_total)),
before = sum(rate(my_metric_total) offset 1h)
)
now/before*100
This expression will fail starting from v1.70 where new MetricsQL function now()
was introduced.
But for versions below v1.70 the expression will be valid.
Expected behavior
Local variable names should not conflict with function names. Otherwise, adding new function to MetricsQL will always have a chance to affect existing user queries.
cc @valyala
Original promql only support limited ascii characters, it would be helpful to support other UTF-8 characters for non-English users
This is my fork to support Chinese chars, It requires small changes to the lexer.
Some queries may be optmized by some rules to reduce latency and impove performance, such As
foo > 2 < 1 -> empty
sum(sum(sum(foo) by (a, b, c) by (a, b))) by (a) -> sum(foo) by (a)
Line 641 in a271ee2
if s[i] == '.' {
j := i
i++
for i < len(s) && isDecimalChar(s[i]) {
i++
}
if i == j || i == len(s) {
return -1
}
}
I'm learning MetricsQL and I've noticed that here 'i' might not be equal to 'j' because 'i' undergoes an addition operation. Should it be j+1 here?
That would be awesome if i can set Bearer token for setInitPush URL when I need to push data to some protected SaaSs
in application code, i want to convert metricql foo{}
to foo{}[1d]
, but the RollupExpr
's field (DurationExpr) has no update operation. can we support it in the near future.
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.