Skip to content

Commit b92df92

Browse files
committed
Update and Sync winlog input integrations
- expose `ignore_older` option - change "Preserve Original Event` option to use `include_xml` - remove check for preserve_original_event from ingest pipelines - make ordering of options the same for all winlog inputs - switch to `processors.length` check to handlebars templates - make including of tags the same in handlebars templates - for windows/forwarded remove requirement to specify event id, none means all, which should be default - for windows/sysmon_operational remove requirement to specify event id, none means all, which should be default - for winlog remove requirement to specify event id, none means all, which should be default Closes #2472
1 parent eac4c40 commit b92df92

File tree

32 files changed

+715
-565
lines changed

32 files changed

+715
-565
lines changed

packages/microsoft_sqlserver/changelog.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
# newer versions go on top
2+
- version: "0.3.0"
3+
changes:
4+
- description: Expose winlog input ignore_older option.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/2542
7+
- description: Fix preserve original event option
8+
type: bugfix
9+
link: https://github.com/elastic/integrations/pull/2542
10+
- description: Make order of options consistent with other winlog based integrations.
11+
type: enhancement
12+
link: https://github.com/elastic/integrations/pull/2542
213
- version: "0.2.0"
314
changes:
415
- description: Expose winlog input language option.

packages/microsoft_sqlserver/data_stream/audit/_dev/test/pipeline/test-events.json-expected.json

Lines changed: 389 additions & 388 deletions
Large diffs are not rendered by default.
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
name: {{channel}}
22
condition: ${host.platform} == 'windows'
33
event_id: {{event_id}}
4+
{{#if ignore_older}}
5+
ignore_older: {{ignore_older}}
6+
{{/if}}
47
{{#if language}}
58
language: {{language}}
69
{{/if}}
710
{{#if tags.length}}
811
tags:
9-
{{else if preserve_original_event}}
10-
tags:
11-
{{/if}}
1212
{{#each tags as |tag i|}}
1313
- {{tag}}
1414
{{/each}}
15+
{{/if}}
1516
{{#if preserve_original_event}}
16-
- preserve_original_event
17+
include_xml: true
1718
{{/if}}
18-
{{#if processors}}
19+
{{#if processors.length}}
1920
processors:
2021
{{processors}}
2122
{{/if}}

packages/microsoft_sqlserver/data_stream/audit/elasticsearch/ingest_pipeline/default.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,11 +1243,6 @@ processors:
12431243
- sqlserver.audit.target_server_principal_name
12441244
- sqlserver.audit.target_server_principal_sid
12451245
ignore_missing: true
1246-
- remove:
1247-
field: event.original
1248-
if: "ctx?.tags == null || !(ctx.tags.contains('preserve_original_event'))"
1249-
ignore_failure: true
1250-
ignore_missing: true
12511246
- script:
12521247
lang: painless
12531248
description: This script processor iterates over the whole document to remove fields with null values.

packages/microsoft_sqlserver/data_stream/audit/manifest.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ streams:
66
description: Collect SQL Server audit events from the Windows event logs
77
template_path: winlog.yml.hbs
88
vars:
9+
- name: preserve_original_event
10+
required: true
11+
show_user: true
12+
title: Preserve original event
13+
description: >-
14+
Preserves a raw copy of the original XML event, added to the field `event.original`
15+
type: bool
16+
multi: false
17+
default: false
918
- name: event_id
1019
type: text
1120
title: Event ID
@@ -23,6 +32,14 @@ streams:
2332
required: true
2433
default: Security
2534
show_user: true
35+
- name: ignore_older
36+
type: text
37+
title: Ignore events older than
38+
default: 72h
39+
required: false
40+
show_user: false
41+
description: >-
42+
If this option is specified, events that are older than the specified amount of time are ignored. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
2643
- name: language
2744
type: text
2845
title: Language ID
@@ -31,23 +48,15 @@ streams:
3148
required: false
3249
show_user: false
3350
default: 0
34-
- name: preserve_original_event
35-
required: true
36-
show_user: true
37-
title: Preserve original event
38-
description: Preserves a raw copy of the original event, added to the field `event.original`
39-
type: bool
40-
multi: false
41-
default: false
51+
- name: tags
52+
type: text
53+
title: Tags
54+
multi: true
55+
show_user: false
4256
- name: processors
4357
type: yaml
4458
title: Processors
4559
multi: false
4660
required: false
4761
show_user: false
4862
description: "Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. \nThis executes in the agent before the logs are parsed. \nSee [Processors](https://www.elastic.co/guide/en/beats/filebeat/current/filtering-and-enhancing-data.html) for details.\n"
49-
- name: tags
50-
type: text
51-
title: Tags
52-
multi: true
53-
show_user: false

packages/microsoft_sqlserver/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: 1.0.0
22
name: microsoft_sqlserver
33
title: "Microsoft SQL Server"
4-
version: 0.2.0
4+
version: 0.3.0
55
license: basic
66
description: Collect audit events from Microsoft SQL Server with Elastic Agent.
77
type: integration

packages/system/changelog.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
# newer versions go on top
2+
- version: "1.10.0"
3+
changes:
4+
- description: Expose winlog input ignore_older option.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/2542
7+
- description: Fix preserve original event option
8+
type: bugfix
9+
link: https://github.com/elastic/integrations/pull/2542
10+
- description: Make order of Security, Application, System options consistent with other winlog based integrations.
11+
type: enhancement
12+
link: https://github.com/elastic/integrations/pull/2542
213
- version: "1.9.0"
314
changes:
415
- description: Update to ECS 8.0
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
name: Application
22
condition: ${host.platform} == 'windows'
3-
ignore_older: 72h
43
{{#if event_id}}
54
event_id: {{event_id}}
65
{{/if}}
6+
{{#if ignore_older}}
7+
ignore_older: {{ignore_older}}
8+
{{/if}}
79
{{#if language}}
810
language: {{language}}
911
{{/if}}
10-
{{#if processors}}
12+
{{#if preserve_original_event}}
13+
include_xml: true
14+
{{/if}}
15+
{{#if processors.length}}
1116
processors:
1217
{{processors}}
1318
{{/if}}
19+
{{#if tags.length}}
1420
tags:
15-
{{#if preserve_original_event}}
16-
- preserve_original_event
17-
{{/if}}
1821
{{#each tags as |tag i|}}
1922
- {{tag}}
20-
{{/each}}
23+
{{/each}}
24+
{{/if}}

packages/system/data_stream/application/elasticsearch/ingest_pipeline/default.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ processors:
77
- set:
88
field: ecs.version
99
value: 8.0.0
10-
- remove:
11-
field: event.original
12-
if: "ctx?.tags == null || !(ctx.tags.contains('preserve_original_event'))"
13-
ignore_failure: true
14-
ignore_missing: true
1510
on_failure:
1611
- set:
1712
field: "error.message"

packages/system/data_stream/application/manifest.yml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ streams:
77
title: Application
88
description: 'Collect Windows application logs'
99
vars:
10+
- name: preserve_original_event
11+
required: true
12+
show_user: true
13+
title: Preserve original event
14+
description: >-
15+
Preserves a raw copy of the original XML event, added to the field `event.original`
16+
type: bool
17+
multi: false
18+
default: false
1019
- name: event_id
1120
type: text
1221
title: Event ID
@@ -15,19 +24,14 @@ streams:
1524
show_user: false
1625
description: >-
1726
A list of included and excluded (blocked) event IDs. The value is a comma-separated list. The accepted values are single event IDs to include (e.g. 4624), a range of event IDs to include (e.g. 4700-4800), and single event IDs to exclude (e.g. -4735). Limit 22 IDs.
18-
- name: processors
19-
type: yaml
20-
title: Processors
21-
multi: false
27+
- name: ignore_older
28+
type: text
29+
title: Ignore events older than
30+
default: 72h
2231
required: false
2332
show_user: false
2433
description: >-
25-
Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the logs are parsed. See [Processors](https://www.elastic.co/guide/en/beats/filebeat/current/filtering-and-enhancing-data.html) for details.
26-
- name: tags
27-
type: text
28-
title: Tags
29-
multi: true
30-
show_user: false
34+
If this option is specified, events that are older than the specified amount of time are ignored. Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
3135
- name: language
3236
type: text
3337
title: Language ID
@@ -36,6 +40,19 @@ streams:
3640
required: false
3741
show_user: false
3842
default: 0
43+
- name: tags
44+
type: text
45+
title: Tags
46+
multi: true
47+
show_user: false
48+
- name: processors
49+
type: yaml
50+
title: Processors
51+
multi: false
52+
required: false
53+
show_user: false
54+
description: >-
55+
Processors are used to reduce the number of fields in the exported event or to enhance the event with metadata. This executes in the agent before the logs are parsed. See [Processors](https://www.elastic.co/guide/en/beats/filebeat/current/filtering-and-enhancing-data.html) for details.
3956
- input: httpjson
4057
title: Windows Application Events via Splunk Enterprise REST API
4158
description: Collect Application Events via Splunk Enterprise REST API

0 commit comments

Comments
 (0)