Skip to content

Commit 6bc6e27

Browse files
authored
Update Logstash single pipeline dashboard with batch byte_size metrics for p50 p90 max (#18311)
Update the cel script to store p50 p90 and max byte size metrics of the batch for the last minute. Switch to use the average last one minute metric instead of the lifetime for both batch's byte size and value to be coherent with the other graphed percentiles. Update the Single Pipeline View to include these new values.
1 parent 53c2aa6 commit 6bc6e27

6 files changed

Lines changed: 301 additions & 77 deletions

File tree

packages/logstash/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "2.11.0"
3+
changes:
4+
- description: Update existing batch graphs with 50th and 90th percentiles during last minute. Replace average lifetime metric with last one minute, for both batch's byte size and value, to be coherent with the other graphed percentiles.. Note that these metrics will only show results for Logstash versions 9.4.0 or later.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/17785
27
- version: "2.10.1"
38
changes:
49
- description: Fixes navigation of batch metrics when the integration is used to monitor an older version of Logstash that doesn't expose.

packages/logstash/data_stream/pipeline/agent/stream/cel.yml.hbs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,16 @@ program: |
6363
"batch":{
6464
"event_count":{
6565
"current": body.pipelines[pipeline_name].?batch.event_count.current.orValue([]),
66-
"average.lifetime": body.pipelines[pipeline_name].?batch.event_count.average.lifetime.orValue([])
66+
"average.last_1_minute": body.pipelines[pipeline_name].?batch.event_count.average.last_1_minute.orValue([]),
67+
"p50.last_1_minute": body.pipelines[pipeline_name].?batch.event_count.p50.last_1_minute.orValue([]),
68+
"p90.last_1_minute": body.pipelines[pipeline_name].?batch.event_count.p90.last_1_minute.orValue([]),
6769
},
6870
"byte_size":{
6971
"current": body.pipelines[pipeline_name].?batch.byte_size.current.orValue([]),
70-
"average.lifetime": body.pipelines[pipeline_name].?batch.byte_size.average.lifetime.orValue([]),
72+
"average.last_1_minute": body.pipelines[pipeline_name].?batch.byte_size.average.last_1_minute.orValue([]),
73+
"p50.last_1_minute": body.pipelines[pipeline_name].?batch.byte_size.p50.last_1_minute.orValue([]),
74+
"p90.last_1_minute": body.pipelines[pipeline_name].?batch.byte_size.p90.last_1_minute.orValue([]),
75+
"max.last_1_minute": body.pipelines[pipeline_name].?batch.byte_size.max.last_1_minute.orValue([]),
7176
},
7277
},
7378
"events":{

packages/logstash/data_stream/pipeline/fields/fields.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,42 @@
4949
type: long
5050
description: Number of events contained in batch by the pipeline
5151
metric_type: gauge
52-
- name: batch.event_count.average.lifetime
52+
- name: batch.event_count.average.last_1_minute
5353
type: long
54-
description: Number of average events contained in batch by the pipeline (Lifetime)
54+
description: Number of average events contained in batch by the pipeline (last 1 minute)
55+
metric_type: gauge
56+
- name: batch.event_count.p50.last_1_minute
57+
type: long
58+
description: 50th percentile of events per batch for the pipeline (last 1 minute)
59+
metric_type: gauge
60+
- name: batch.event_count.p90.last_1_minute
61+
type: long
62+
description: 90th percentile of events per batch for the pipeline (last 1 minute)
5563
metric_type: gauge
5664
- name: batch.byte_size.current
5765
type: long
5866
unit: byte
5967
description: Size in bytes of batch by the pipeline
6068
metric_type: gauge
61-
- name: batch.byte_size.average.lifetime
69+
- name: batch.byte_size.average.last_1_minute
70+
type: long
71+
unit: byte
72+
description: Average size in bytes of batch by the pipeline (last 1 minute)
73+
metric_type: gauge
74+
- name: batch.byte_size.p50.last_1_minute
75+
type: long
76+
unit: byte
77+
description: 50th percentile of batch size in bytes for the pipeline (last 1 minute)
78+
metric_type: gauge
79+
- name: batch.byte_size.p90.last_1_minute
80+
type: long
81+
unit: byte
82+
description: 90th percentile of batch size in bytes for the pipeline (last 1 minute)
83+
metric_type: gauge
84+
- name: batch.byte_size.max.last_1_minute
6285
type: long
6386
unit: byte
64-
description: Average size in bytes of batch by the pipeline (Lifetime)
87+
description: Maximum batch size in bytes for the pipeline (last 1 minute)
6588
metric_type: gauge
6689
- name: events.filtered
6790
type: long

packages/logstash/docs/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,15 @@ This is the `pipeline` dataset, which drives the Pipeline dashboard pages.
461461
| logstash.pipeline.info.ephemeral_id | Ephemeral Id for the running pipeline | keyword | | |
462462
| logstash.pipeline.info.workers | Number of workers for the running pipeline | long | | gauge |
463463
| logstash.pipeline.name | Logstash Pipeline id/name | keyword | | |
464-
| logstash.pipeline.total.batch.byte_size.average.lifetime | Average size in bytes of batch by the pipeline (Lifetime) | long | byte | gauge |
464+
| logstash.pipeline.total.batch.byte_size.average.last_1_minute | Average size in bytes of batch by the pipeline (last 1 minute) | long | byte | gauge |
465465
| logstash.pipeline.total.batch.byte_size.current | Size in bytes of batch by the pipeline | long | byte | gauge |
466-
| logstash.pipeline.total.batch.event_count.average.lifetime | Number of average events contained in batch by the pipeline (Lifetime) | long | | gauge |
466+
| logstash.pipeline.total.batch.byte_size.max.last_1_minute | Maximum batch size in bytes for the pipeline (last 1 minute) | long | byte | gauge |
467+
| logstash.pipeline.total.batch.byte_size.p50.last_1_minute | 50th percentile of batch size in bytes for the pipeline (last 1 minute) | long | byte | gauge |
468+
| logstash.pipeline.total.batch.byte_size.p90.last_1_minute | 90th percentile of batch size in bytes for the pipeline (last 1 minute) | long | byte | gauge |
469+
| logstash.pipeline.total.batch.event_count.average.last_1_minute | Number of average events contained in batch by the pipeline (last 1 minute) | long | | gauge |
467470
| logstash.pipeline.total.batch.event_count.current | Number of events contained in batch by the pipeline | long | | gauge |
471+
| logstash.pipeline.total.batch.event_count.p50.last_1_minute | 50th percentile of events per batch for the pipeline (last 1 minute) | long | | gauge |
472+
| logstash.pipeline.total.batch.event_count.p90.last_1_minute | 90th percentile of events per batch for the pipeline (last 1 minute) | long | | gauge |
468473
| logstash.pipeline.total.events.filtered | Number of events filtered by the pipeline | long | | counter |
469474
| logstash.pipeline.total.events.in | Number of events received by the pipeline | long | | counter |
470475
| logstash.pipeline.total.events.out | Number of events emitted by the pipeline | long | | counter |

0 commit comments

Comments
 (0)