Skip to content

Commit 399ac8f

Browse files
authored
[Logstash integration] Add current and peak connections metrics of elastic-agent input plugin. (#15148)
* Saves current and peak connections metrics of elastic-agent input plugin and visualizes on dashboard. * Update the type migration version which was snapshot before. * Unify current and peak connections graphs into single view. * Rename y-axis title. * Rename the dashboard title and panel. * Specify Logstash versions which expose these metrics.
1 parent 30cbfa8 commit 399ac8f

File tree

6 files changed

+84
-2
lines changed

6 files changed

+84
-2
lines changed

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.8.0"
3+
changes:
4+
- description: Adds a dashboard for monitoring current and peak connections in the elastic_agent or beats input plugins. These metrics are available only in Logstash versions 8.18.7, 8.19.4, 9.0.7, 9.1.4, or later. Older versions do not expose them.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/14727
27
- version: "2.7.4"
38
changes:
49
- description: |

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ program: |
5050
:
5151
[],
5252
"counter_map": has(body.pipelines[pipeline_name].vertices) ?
53-
body.pipelines[pipeline_name].vertices.map(vertex, has(vertex.long_counters), vertex.long_counters.map(counter, {
53+
body.pipelines[pipeline_name].vertices.map(vertex, has(vertex.long_counters) || has(vertex.double_gauges),
54+
((has(vertex.long_counters) ? vertex.long_counters : []) + (has(vertex.double_gauges) ? vertex.double_gauges : [])).map(counter, {
5455
"plugin_id": vertex.id,
5556
"name": counter.name,
5657
"value": counter.value

packages/logstash/data_stream/plugins/fields/fields.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,22 @@
109109
type: scaled_float
110110
metric_type: gauge
111111
description: throughput of this input plugin
112+
- name: metrics
113+
type: group
114+
description: Plugin specific metrics
115+
fields:
116+
- name: beats
117+
type: group
118+
description: elastic_agent or beats input plugin specific metrics
119+
fields:
120+
- name: peak_connections
121+
type: long
122+
description: Number of peak connections
123+
metric_type: counter
124+
- name: current_connections
125+
type: long
126+
description: Current connections count
127+
metric_type: counter
112128
- name: filter
113129
type: group
114130
description: Information about filter plugins

packages/logstash/docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,8 @@ pipeline collection period, and setting it to an appropriate value.
687687
| logstash.pipeline.plugin.input.flow.throughput.current | throughput of this input plugin | scaled_float | | gauge |
688688
| logstash.pipeline.plugin.input.flow.throughput.last_1_minute | throughput of this input plugin | scaled_float | | gauge |
689689
| logstash.pipeline.plugin.input.id | Id of input plugin | keyword | | |
690+
| logstash.pipeline.plugin.input.metrics.beats.current_connections | Current connections count | long | | counter |
691+
| logstash.pipeline.plugin.input.metrics.beats.peak_connections | Number of peak connections | long | | counter |
690692
| logstash.pipeline.plugin.input.name | Name of input plugin | keyword | | |
691693
| logstash.pipeline.plugin.input.source.column | | keyword | | |
692694
| logstash.pipeline.plugin.input.source.id | | keyword | | |

0 commit comments

Comments
 (0)