@@ -38,7 +38,7 @@ To enable downsampling, add a <<ilm-downsample,Downsample action>> and set
3838<<ilm-downsample-options,`fixed_interval`>> to the downsampling interval at
3939which you want to aggregate the original time series data.
4040
41- In this example, an ILM policy is configired for the `hot` phase. The downsample
41+ In this example, an ILM policy is configured for the `hot` phase. The downsample
4242takes place after the initial index rollover, which for demonstration
4343purposes is set to run after five minutes.
4444
@@ -292,7 +292,8 @@ GET _data_stream
292292If the ILM policy has not yet been applied, your results will be like the
293293following. Note the original `index_name`: `.ds-datastream-<timestamp>-000001`.
294294
295- ```
295+ [source,console-result]
296+ ----
296297{
297298 "data_streams": [
298299 {
@@ -329,7 +330,9 @@ following. Note the original `index_name`: `.ds-datastream-<timestamp>-000001`.
329330 }
330331 ]
331332}
332- ```
333+ ----
334+ // TEST[skip:todo]
335+ // TEST[continued]
333336
334337Next, run a search query:
335338
@@ -341,7 +344,8 @@ GET datastream/_search
341344
342345The query returns your ten newly added documents.
343346
344- ```
347+ [source,console-result]
348+ ----
345349{
346350 "took": 17,
347351 "timed_out": false,
@@ -357,7 +361,9 @@ The query returns your ten newly added documents.
357361 "relation": "eq"
358362 },
359363...
360- ```
364+ ----
365+ // TEST[skip:todo]
366+ // TEST[continued]
361367
362368By default, index lifecycle management checks every ten minutes for indices that
363369meet policy criteria. Wait for about ten minutes (maybe brew up a quick coffee
@@ -373,7 +379,8 @@ After the ILM policy has taken effect, the original
373379`.ds-datastream-2022.08.26-000001` index is replaced with a new, downsampled
374380index, in this case `downsample-6tkn-.ds-datastream-2022.08.26-000001`.
375381
376- ```
382+ [source,console-result]
383+ ----
377384{
378385 "data_streams": [
379386 {
@@ -392,21 +399,24 @@ index, in this case `downsample-6tkn-.ds-datastream-2022.08.26-000001`.
392399 }
393400 ],
394401...
395- ```
402+ ----
403+ // TEST[skip:todo]
404+ // TEST[continued]
396405
397406Run a search query on the datastream.
398407
399408[source,console]
400409----
401410GET datastream/_search
402411----
403- // TEST[skip: The @timestamp value won't match an accepted range in the TSDS ]
412+ // TEST[continued ]
404413
405414The new downsampled index contains just one document that includes the `min`,
406415`max`, `sum`, and `value_count` statistics based off of the original sampled
407416metrics.
408417
409- ```
418+ [source,console-result]
419+ ----
410420{
411421 "took": 6,
412422 "timed_out": false,
@@ -483,7 +493,9 @@ metrics.
483493 ]
484494 }
485495}
486- ```
496+ ----
497+ // TEST[skip:todo]
498+ // TEST[continued]
487499
488500Use the <<data-stream-stats-api,data stream stats API>> to get statistics for
489501the data stream, including the storage size.
@@ -492,9 +504,10 @@ the data stream, including the storage size.
492504----
493505GET /_data_stream/datastream/_stats?human=true
494506----
495- // TEST[skip: The @timestamp value won't match an accepted range in the TSDS ]
507+ // TEST[continued ]
496508
497- ```
509+ [source,console-result]
510+ ----
498511{
499512 "_shards": {
500513 "total": 4,
@@ -515,7 +528,9 @@ GET /_data_stream/datastream/_stats?human=true
515528 }
516529 ]
517530}
518- ```
531+ ----
532+ // TEST[skip:todo]
533+ // TEST[continued]
519534
520535This example demonstrates how downsampling works as part of an ILM policy to
521536reduce the storage size of metrics data as it becomes less current and less
0 commit comments