@@ -17,6 +17,24 @@ clients:double | cluster:keyword | time_bucket:datetime
1717357.0 | staging | 2024-05-10T00:03:00.000Z
1818;
1919
20+ implicit_last_over_time_of_integer
21+ required_capability: metrics_command
22+ required_capability: implicit_last_over_time
23+ TS k8s | STATS clients = avg(network.eth0.currently_connected_clients) BY cluster, time_bucket = bucket(@timestamp,1minute) | SORT time_bucket, cluster | LIMIT 10;
24+
25+ clients:double | cluster:keyword | time_bucket:datetime
26+ 429.0 | prod | 2024-05-10T00:00:00.000Z
27+ 615.5 | staging | 2024-05-10T00:00:00.000Z
28+ 396.5 | prod | 2024-05-10T00:01:00.000Z
29+ 440.0 | qa | 2024-05-10T00:01:00.000Z
30+ 632.5 | prod | 2024-05-10T00:02:00.000Z
31+ 565.0 | qa | 2024-05-10T00:02:00.000Z
32+ 205.0 | staging | 2024-05-10T00:02:00.000Z
33+ 742.0 | prod | 2024-05-10T00:03:00.000Z
34+ 454.0 | qa | 2024-05-10T00:03:00.000Z
35+ 357.0 | staging | 2024-05-10T00:03:00.000Z
36+ ;
37+
2038last_over_time_of_long
2139required_capability: metrics_command
2240required_capability: last_over_time
@@ -35,6 +53,24 @@ bytes:double | cluster:keyword | time_bucket:datetime
3553612.5 | staging | 2024-05-10T00:03:00.000Z
3654;
3755
56+ implicit_last_over_time_of_long
57+ required_capability: metrics_command
58+ required_capability: implicit_last_over_time
59+ TS k8s | STATS bytes = avg(network.bytes_in) BY cluster, time_bucket = bucket(@timestamp,1minute) | SORT time_bucket, cluster | LIMIT 10;
60+
61+ bytes:double | cluster:keyword | time_bucket:datetime
62+ 677.0 | prod | 2024-05-10T00:00:00.000Z
63+ 586.0 | staging | 2024-05-10T00:00:00.000Z
64+ 628.5 | prod | 2024-05-10T00:01:00.000Z
65+ 538.5 | qa | 2024-05-10T00:01:00.000Z
66+ 612.0 | prod | 2024-05-10T00:02:00.000Z
67+ 749.0 | qa | 2024-05-10T00:02:00.000Z
68+ 382.5 | staging | 2024-05-10T00:02:00.000Z
69+ 970.0 | prod | 2024-05-10T00:03:00.000Z
70+ 373.0 | qa | 2024-05-10T00:03:00.000Z
71+ 612.5 | staging | 2024-05-10T00:03:00.000Z
72+ ;
73+
3874last_over_time_with_filtering
3975required_capability: metrics_command
4076required_capability: last_over_time
@@ -52,6 +88,25 @@ tx:long | cluster:keyword | time_bucket:datetime
5288238 | staging | 2024-05-10T00:20:00.000Z
5389;
5490
91+
92+ implicit_last_over_time_with_filtering
93+ required_capability: metrics_command
94+ required_capability: implicit_last_over_time
95+ TS k8s | WHERE pod == "one" | STATS tx = sum(network.bytes_in) BY cluster, time_bucket = bucket(@timestamp, 10minute) | SORT time_bucket, cluster | LIMIT 10;
96+
97+ tx:long | cluster:keyword | time_bucket:datetime
98+ 3 | prod | 2024-05-10T00:00:00.000Z
99+ 830 | qa | 2024-05-10T00:00:00.000Z
100+ 753 | staging | 2024-05-10T00:00:00.000Z
101+ 542 | prod | 2024-05-10T00:10:00.000Z
102+ 187 | qa | 2024-05-10T00:10:00.000Z
103+ 4 | staging | 2024-05-10T00:10:00.000Z
104+ 931 | prod | 2024-05-10T00:20:00.000Z
105+ 206 | qa | 2024-05-10T00:20:00.000Z
106+ 238 | staging | 2024-05-10T00:20:00.000Z
107+ ;
108+
109+
55110last_over_time_older_than_10d
56111required_capability: metrics_command
57112required_capability: last_over_time
@@ -65,6 +120,19 @@ cost:double | pod:keyword | time_bucket:datetime
651201038.0 | three | 2024-05-10T00:10:00.000Z
66121;
67122
123+ implicit_last_over_time_older_than_10d
124+ required_capability: metrics_command
125+ required_capability: implicit_last_over_time
126+ TS k8s | WHERE cluster == "qa" AND @timestamp < now() - 10 day | STATS cost = avg(network.eth0.rx) BY pod, time_bucket = bucket(@timestamp, 10minute) | SORT time_bucket, pod | LIMIT 5;
127+
128+ cost:double | pod:keyword | time_bucket:datetime
129+ 818.0 | one | 2024-05-10T00:00:00.000Z
130+ 529.0 | three | 2024-05-10T00:00:00.000Z
131+ 620.0 | two | 2024-05-10T00:00:00.000Z
132+ 1262.0 | one | 2024-05-10T00:10:00.000Z
133+ 1038.0 | three | 2024-05-10T00:10:00.000Z
134+ ;
135+
68136eval_on_last_over_time
69137required_capability: metrics_command
70138required_capability: last_over_time
@@ -82,6 +150,23 @@ max_bytes:double | cluster:keyword | time_bucket:datetime | kb_minus_offset
8215081.33333333333333 | staging | 2024-05-10T00:20:00.000Z | -0.01866666666666667
83151;
84152
153+ implicit_eval_on_last_over_time
154+ required_capability: metrics_command
155+ required_capability: implicit_last_over_time
156+ TS k8s | STATS max_bytes = avg(network.bytes_in) BY cluster, time_bucket = bucket(@timestamp, 10minute) | EVAL kb_minus_offset = (max_bytes - 100) / 1000.0 | LIMIT 10 | SORT time_bucket, cluster ;
157+
158+ max_bytes:double | cluster:keyword | time_bucket:datetime | kb_minus_offset:double
159+ 225.0 | prod | 2024-05-10T00:00:00.000Z | 0.125
160+ 485.6666666666667 | qa | 2024-05-10T00:00:00.000Z | 0.3856666666666667
161+ 572.6666666666666 | staging | 2024-05-10T00:00:00.000Z | 0.4726666666666666
162+ 517.6666666666666 | prod | 2024-05-10T00:10:00.000Z | 0.41766666666666663
163+ 426.6666666666667 | qa | 2024-05-10T00:10:00.000Z | 0.32666666666666666
164+ 482.3333333333333 | staging | 2024-05-10T00:10:00.000Z | 0.3823333333333333
165+ 839.0 | prod | 2024-05-10T00:20:00.000Z | 0.739
166+ 697.0 | qa | 2024-05-10T00:20:00.000Z | 0.597
167+ 81.33333333333333 | staging | 2024-05-10T00:20:00.000Z | -0.01866666666666667
168+ ;
169+
85170last_over_time_multi_values
86171required_capability: metrics_command
87172required_capability: last_over_time
@@ -101,6 +186,26 @@ events:long | pod:keyword | time_bucket:datetime
1011869 | three | 2024-05-10T00:02:00.000Z
102187;
103188
189+
190+ implicit_last_over_time_multi_values
191+ required_capability: metrics_command
192+ required_capability: implicit_last_over_time
193+ TS k8s | WHERE @timestamp < "2024-05-10T00:10:00.000Z" | STATS events = sum(events_received) by pod, time_bucket = bucket(@timestamp, 1minute) | SORT events desc, pod, time_bucket | LIMIT 10;
194+
195+ events:long | pod:keyword | time_bucket:datetime
196+ 18 | one | 2024-05-10T00:01:00.000Z
197+ 16 | one | 2024-05-10T00:08:00.000Z
198+ 12 | one | 2024-05-10T00:03:00.000Z
199+ 12 | three | 2024-05-10T00:00:00.000Z
200+ 12 | two | 2024-05-10T00:09:00.000Z
201+ 10 | three | 2024-05-10T00:06:00.000Z
202+ 10 | two | 2024-05-10T00:02:00.000Z
203+ 10 | two | 2024-05-10T00:04:00.000Z
204+ 9 | one | 2024-05-10T00:09:00.000Z
205+ 9 | three | 2024-05-10T00:02:00.000Z
206+ ;
207+
208+
104209last_over_time_null_values
105210required_capability: metrics_command
106211required_capability: last_over_time
@@ -120,6 +225,24 @@ null | two | 2024-05-10T00:13:00.000Z
1202257 | three | 2024-05-10T00:12:00.000Z
121226;
122227
228+ implicit_last_over_time_null_values
229+ required_capability: metrics_command
230+ required_capability: implicit_last_over_time
231+ TS k8s | WHERE @timestamp > "2024-05-10T00:10:00.000Z" and @timestamp < "2024-05-10T00:15:00.000Z" | STATS events = sum(events_received) by pod, time_bucket = bucket(@timestamp, 1minute) | SORT events desc, pod, time_bucket | LIMIT 10;
232+
233+ events:long | pod:keyword | time_bucket:datetime
234+ null | one | 2024-05-10T00:12:00.000Z
235+ null | two | 2024-05-10T00:13:00.000Z
236+ 20 | two | 2024-05-10T00:14:00.000Z
237+ 18 | two | 2024-05-10T00:12:00.000Z
238+ 16 | one | 2024-05-10T00:13:00.000Z
239+ 16 | one | 2024-05-10T00:14:00.000Z
240+ 11 | one | 2024-05-10T00:10:00.000Z
241+ 9 | one | 2024-05-10T00:11:00.000Z
242+ 9 | three | 2024-05-10T00:13:00.000Z
243+ 7 | three | 2024-05-10T00:12:00.000Z
244+ ;
245+
123246last_over_time_all_value_types
124247required_capability: metrics_command
125248required_capability: last_over_time
@@ -138,3 +261,21 @@ events:long | pod:keyword | time_bucket:datetime
1382615 | two | 2024-05-10T00:20:00.000Z
139262;
140263
264+
265+ implicit_last_over_time_all_value_types
266+ required_capability: metrics_command
267+ required_capability: implicit_last_over_time
268+ TS k8s | STATS events = sum(events_received) by pod, time_bucket = bucket(@timestamp, 10minute) | SORT events desc, pod, time_bucket | LIMIT 10 ;
269+
270+ events:long | pod:keyword | time_bucket:datetime
271+ 21 | three | 2024-05-10T00:10:00.000Z
272+ 20 | one | 2024-05-10T00:10:00.000Z
273+ 15 | one | 2024-05-10T00:20:00.000Z
274+ 15 | three | 2024-05-10T00:20:00.000Z
275+ 13 | two | 2024-05-10T00:10:00.000Z
276+ 12 | two | 2024-05-10T00:00:00.000Z
277+ 9 | one | 2024-05-10T00:00:00.000Z
278+ 9 | three | 2024-05-10T00:00:00.000Z
279+ 5 | two | 2024-05-10T00:20:00.000Z
280+ ;
281+
0 commit comments