Comments (4)
Hello @tekert
This is caused by implicit query conversion:
If something other than series selector is passed to rollup function, then a subquery with 1i lookbehind window and 1i step is automatically formed. For example, rate(sum(up)) is automatically converted to rate((sum(default_rollup(up)))[1i:1i]). This behavior can be disabled or logged via cmd-line flags -search.disableImplicitConversion and -search.logImplicitConversion since v1.101.0.
So {__name__=~"node_netstat_Ip(6|)_(Reasm|Frag).*", job="node_exporter"} * 30
is evaluated as a subquery. Also, this will be further transformed into default_rollup({__name__=~"node_netstat_Ip(6|)_(Reasm|Frag).*", job="node_exporter"}) + 30
.
In order to make that work as you expect you need to use the following query: rate({__name__=~"node_netstat_Ip(6|)_(Reasm|Frag).*", job="node_exporter"} * 30 keep_metric_names) keep_metric_names
.
See this for example.
Also, starting from v1.101.0 it is possible to either enable logging for implicit query conversions or disable this completely by using -search.logImplicitConversion
or -search.disableImplicitConversion
command-line flags respectively.
from victoriametrics.
Thanks @zekker6 , "other than series selector" mean a subquery that returns multiple metrics in this case?
So to understand correctly if i disable implicit conversion, what would i have to write? if I write the query without * 30 :
rate(default_rollup({__name__=~"node_netstat_Ip(6|)_(Out|In).*"})[30s]) keep_metric_names
Works, and to add a binary operation, seems i have to do it inside the selection like this
rate(default_rollup({__name__=~"node_netstat_Ip(6|)_(Out|In).*"} * 30 keep_metric_names)) keep_metric_names
And not like this:
rate(default_rollup({__name__=~"node_netstat_Ip(6|)_(Out|In).*"}) * 30 keep_metric_names) keep_metric_names
edit: funny if i multiply doing * 30s
(s at the end) it works too, wonder what is doing.
from victoriametrics.
"other than series selector" mean a subquery that returns multiple metrics in this case?
No, in this case rate()
takes a binary operation expression as an argument(a * b
) which leads to using implicit convertion.
So to understand correctly if i disable implicit conversion, what would i have to write? if I write the query without * 30 :
edit: funny if i multiply doing * 30s (s at the end) it works too, wonder what is doing.
The idea is to pass a metric selector to the rollup function, so when you're using rate(a) * b
there will be no subquery since rate argument is a metric selector.
from victoriametrics.
I see, thanks @zekker6 closing this.
from victoriametrics.
Related Issues (20)
- vmui: add tab for viewing raw data HOT 1
- delete series API leads to OOM kill on cluster version
- Victorialogs : a tail query no longer works with version 0.29.0 HOT 1
- vmstorage: expose number of matched metric IDs as a histogram HOT 1
- Add Insert Latency to single and cluster dashboards
- VictoriaLogs: Missing otel resource.attributes and attributes in otel formatted logs HOT 5
- Storage Tiering - cold storage support in VictoriaMetrics (VictoriaLogs)
- vmselect: add support of SRV discovery for `-selectNode` flag
- query api returns duplicated datapoints for Graphite metrics HOT 1
- vmui: apply default sorting by stream
- vmui: live tailing tab
- vmui: table compact view doesn't respect selected columns HOT 1
- Adding Elestio as deployment option HOT 2
- vmstorage: improvements for limiting memory usage HOT 1
- vmcluster: RPC updates HOT 1
- Misleading documentation for calculating disk space for persistence queue HOT 1
- custom dedupInterval HOT 1
- recording data errors and data loss. HOT 9
- lib/promscrape: flaky test TestClientProxyReadOk HOT 1
- VictoriaLogs web UI: add the ability to show stream context per each log line
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from victoriametrics.