Skip to content

Commit 082ee65

Browse files
jamesagarsideclaude
andcommitted
Add logs stream support to TCP and UDP packages
- Add use_logs_stream configuration option to enable sending data to the unified "logs" data stream - Update tcp.yml.hbs and udp.yml.hbs templates to conditionally route to logs index - Bump TCP version to 2.1.0 and UDP version to 2.3.0 - Follows the same pattern as filestream package This feature allows users to send all ingested data to the "logs" data stream instead of custom datasets when the "Write to logs streams" option is enabled in output settings. Note: System tests for logs-stream variants will fail due to a known elastic-package bug being fixed in elastic/elastic-package#3037. Policy tests pass, confirming the configuration is correct. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent dc3ca8c commit 082ee65

File tree

6 files changed

+36
-2
lines changed

6 files changed

+36
-2
lines changed

packages/tcp/agent/input/tcp.yml.hbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
{{#if use_logs_stream}}
2+
index: logs
3+
{{else}}
14
data_stream:
25
dataset: {{data_stream.dataset}}
6+
{{/if}}
37
host: {{listen_address}}:{{listen_port}}
48
{{#if pipeline}}
59
pipeline: {{pipeline}}

packages/tcp/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
- version: "2.1.0"
2+
changes:
3+
- description: Add logs stream support.
4+
type: enhancement
5+
link: https://github.com/elastic/integrations/pull/TBD
16
- version: "2.0.1"
27
changes:
38
- description: Changed owners.

packages/tcp/manifest.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: tcp
33
title: Custom TCP Logs
44
description: Collect raw TCP data from listening TCP port with Elastic Agent.
55
type: input
6-
version: "2.0.1"
6+
version: "2.1.0"
77
conditions:
88
kibana:
99
version: "^8.13.0 || ^9.0.0"
@@ -34,6 +34,14 @@ policy_templates:
3434
required: true
3535
show_user: true
3636
default: 8080
37+
- name: use_logs_stream
38+
type: bool
39+
title: Use the "logs" data stream
40+
description: |
41+
Enabling this will send all the ingested data to the "logs" data stream. This feature is disabled by default. If enabled the Dataset name option is ignored. "Write to logs streams" option must be enabled in the output settings for this to work.
42+
required: false
43+
show_user: true
44+
default: false
3745
- name: data_stream.dataset
3846
type: text
3947
title: Dataset name

packages/udp/agent/input/udp.yml.hbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1+
{{#if use_logs_stream}}
2+
index: logs
3+
{{else}}
14
data_stream:
25
dataset: {{data_stream.dataset}}
6+
{{/if}}
37
host: {{listen_address}}:{{listen_port}}
48
{{#if pipeline}}
59
pipeline: {{pipeline}}

packages/udp/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
- version: "2.3.0"
2+
changes:
3+
- description: Add logs stream support.
4+
type: enhancement
5+
link: https://github.com/elastic/integrations/pull/TBD
16
- version: "2.2.1"
27
changes:
38
- description: Changed owners.

packages/udp/manifest.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: udp
33
title: Custom UDP Logs
44
description: Collect raw UDP data from listening UDP port with Elastic Agent.
55
type: input
6-
version: "2.2.1"
6+
version: "2.3.0"
77
conditions:
88
kibana:
99
version: "^8.13.0 || ^9.0.0"
@@ -36,6 +36,14 @@ policy_templates:
3636
required: true
3737
show_user: true
3838
default: 8080
39+
- name: use_logs_stream
40+
type: bool
41+
title: Use the "logs" data stream
42+
description: |
43+
Enabling this will send all the ingested data to the "logs" data stream. This feature is disabled by default. If enabled the Dataset name option is ignored. "Write to logs streams" option must be enabled in the output settings for this to work.
44+
required: false
45+
show_user: true
46+
default: false
3947
- name: data_stream.dataset
4048
type: text
4149
title: Dataset name

0 commit comments

Comments
 (0)