Add macro similar to $rateColumns for counter like metrics
See original GitHub issueSimilarly to request in #78, please consider adding support for computing $perSecond for multiple series (hosts).
Currently, the $rateColumns computes something like:
SELECT t, arrayMap(a -> (a.1, a.2/runningDifference( t/1000 )), groupArr)
FROM (
SELECT t, groupArray((host, v)) as groupArr
....
Which does not produce correct results for metrics which only grows over time, as one needs to compute difference between two consequitive values v
as well (not just time).
Unfortunatelly, doing runningDifference(a.2)/runningDifference(t/1000)
does not work, as a.2
gets materialized to different values v
between different columns (host
).
I have been scratching my head for a while and I am not sure how to write such query in Clickhouse at all. I hope you know better π
Issue Analytics
- State:
- Created 5 years ago
- Comments:15
Top Results From Across the Web
Add macro similar to $rateColumns for counter like metrics
1, a.2/runningDifference( t/1000 )), groupArr) FROM ( SELECT t, groupArray((host, v)) as groupArr .... Which does not produce correct resultsΒ ...
Read more >Altinity plugin for ClickHouse plugin ...
Since ad-hoc applies automatically only to outer queries the macros can be used for ... is a combination of $columns and $perSecond for...
Read more >Alexander Bilous / clickhouse-grafana - GitLab - Nurd
Since ad-hoc applies automatically only to outer queries the macros can be used for ... is a combination of $columns and $perSecond for...
Read more >FANUC CNC custom Macros
Macro B), sev eral re lated top ics have been added, mainly for co her ... on a lathe, count ing the parts...
Read more >Do financial markets respond to macroeconomic surprises ...
The present paper adds to this growing corpus of knowledge by ... Macroeconomic surprises concerning retail sales, claimant count rate, GDP,Β ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @JiriHorky Back to #78 Letβs introduce new data:
Here we have a
Type
column and counterPackets
. It is obvious, thattcp
grows by 1000 per minute (1000/60=16.6 per second) andudp
by 2000 per minute (2000/60=33.33 per second). I think the macros should implement the following query:Please, note some details:
max
value for period instead of counting, since weβre dealing with counter:Please, try this construction with your data. If it fits your need Iβll add a new macros into plugin. Thank you!
Please, see https://github.com/Vertamedia/clickhouse-grafana/releases/tag/1.8.0