Skip to content

Commit

Permalink
filebeat/input/tcp: add support for TCP input metrics (#34333)
Browse files Browse the repository at this point in the history
* convert to v2 input
* add input metrics support
  • Loading branch information
efd6 authored Jan 24, 2023
1 parent 78e3a37 commit 5ed9f16
Show file tree
Hide file tree
Showing 8 changed files with 267 additions and 184 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ https://github.com/elastic/beats/compare/v8.2.0\...main[Check the HEAD diff]
- Allow user configuration of keep-alive behaviour for HTTPJSON and CEL inputs. {issue}33951[33951] {pull}34014[34014]
- Add support for polling system UDP stats for UDP input metrics. {pull}34070[34070]
- Add support for recognizing the log level in Elasticsearch JVM logs {pull}34159[34159]
- Add metrics for TCP packet processing. {pull}34333[34333]

*Auditbeat*

Expand Down
18 changes: 18 additions & 0 deletions filebeat/docs/inputs/input-tcp.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@ The `tcp` input supports the following configuration options plus the

include::../inputs/input-common-tcp-options.asciidoc[]

[float]
=== Metrics

This input exposes metrics under the <<http-endpoint, HTTP monitoring endpoint>>.
These metrics are exposed under the `/dataset` path. They can be used to
observe the activity of the input.

[options="header"]
|=======
| Metric | Description
| `device` | Host/port of the TCP stream.
| `received_events_total` | Total number of packets (events) that have been received.
| `received_bytes_total` | Total number of bytes received.
| `receive_queue_length` | Size of the system receive queue (linux only) (guage).
| `arrival_period` | Histogram of the time between successive packets in nanoseconds.
| `processing_time` | Histogram of the time taken to process packets in nanoseconds.
|=======

[id="{beatname_lc}-input-{type}-common-options"]
include::../inputs/input-common-options.asciidoc[]

Expand Down
1 change: 0 additions & 1 deletion filebeat/include/list.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions filebeat/input/default-inputs/inputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/elastic/beats/v7/filebeat/beater"
"github.com/elastic/beats/v7/filebeat/input/filestream"
"github.com/elastic/beats/v7/filebeat/input/kafka"
"github.com/elastic/beats/v7/filebeat/input/tcp"
"github.com/elastic/beats/v7/filebeat/input/udp"
"github.com/elastic/beats/v7/filebeat/input/unix"
v2 "github.com/elastic/beats/v7/filebeat/input/v2"
Expand All @@ -39,6 +40,7 @@ func genericInputs(log *logp.Logger, components beater.StateStore) []v2.Plugin {
return []v2.Plugin{
filestream.Plugin(log, components),
kafka.Plugin(),
tcp.Plugin(),
udp.Plugin(),
unix.Plugin(),
}
Expand Down
47 changes: 0 additions & 47 deletions filebeat/input/tcp/config.go

This file was deleted.

Loading

0 comments on commit 5ed9f16

Please sign in to comment.