Skip to content

Commit

Permalink
Make event.original optional for application, security, and system da…
Browse files Browse the repository at this point in the history
…ta streams
  • Loading branch information
marc-gr committed May 14, 2021
1 parent e1c09f7 commit 885c9f7
Show file tree
Hide file tree
Showing 14 changed files with 96 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/system/changelog.yml
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "0.12.5"
changes:
- description: Make event.original optional for application, security, and system data streams.
type: enhancement
link: https://github.com/elastic/integrations/pull/
- version: "0.12.4"
changes:
- description: Fix inconsistent dashboard IDs
Expand Down
Expand Up @@ -33,6 +33,9 @@ tags:
{{#each tags as |tag i|}}
- {{tag}}
{{/each}}
{{#if preserve_original_event}}
- preserve_original_event
{{/if}}
{{#contains tags "forwarded"}}
publisher_pipeline.disable_host: true
{{/contains}}
Expand Down
@@ -1,3 +1,7 @@
name: Application
condition: ${host.platform} == 'windows'
ignore_older: 72h
ignore_older: 72h
tags:
{{#if preserve_original_event}}
- preserve_original_event
{{/if}}
Expand Up @@ -4,6 +4,11 @@
- set:
field: event.ingested
value: '{{_ingest.timestamp}}'
- remove:
field: event.original
if: "ctx?.tags == null || !(ctx.tags.contains('preserve_original_event'))"
ignore_failure: true
ignore_missing: true
on_failure:
- set:
field: "error.message"
Expand Down
17 changes: 17 additions & 0 deletions packages/system/data_stream/application/manifest.yml
Expand Up @@ -6,6 +6,15 @@ streams:
template_path: winlog.yml.hbs
title: Application
description: 'Collect Windows application logs'
vars:
- name: preserve_original_event
required: true
show_user: true
title: Preserve original event
description: Preserves a raw copy of the original event, added to the field `event.original`
type: bool
multi: false
default: false
- input: httpjson
title: Windows Application Events via Splunk Enterprise REST API
description: Collect Application Events via Splunk Enterprise REST API
Expand All @@ -19,6 +28,14 @@ streams:
show_user: true
required: true
default: 10s
- name: preserve_original_event
required: true
show_user: true
title: Preserve original event
description: Preserves a raw copy of the original event, added to the field `event.original`
type: bool
multi: false
default: false
- name: search
type: text
title: Splunk search string
Expand Down
Expand Up @@ -33,6 +33,9 @@ tags:
{{#each tags as |tag i|}}
- {{tag}}
{{/each}}
{{#if preserve_original_event}}
- preserve_original_event
{{/if}}
{{#contains tags "forwarded"}}
publisher_pipeline.disable_host: true
{{/contains}}
Expand Down
@@ -1,2 +1,6 @@
name: Security
condition: ${host.platform} == 'windows'
tags:
{{#if preserve_original_event}}
- preserve_original_event
{{/if}}
Expand Up @@ -3170,6 +3170,12 @@ processors:
ignore_failure: true
if: ctx?.winlog?.time_created != null

- remove:
field: event.original
if: "ctx?.tags == null || !(ctx.tags.contains('preserve_original_event'))"
ignore_failure: true
ignore_missing: true

on_failure:
- set:
field: error.message
Expand Down
17 changes: 17 additions & 0 deletions packages/system/data_stream/security/manifest.yml
Expand Up @@ -6,6 +6,15 @@ streams:
template_path: winlog.yml.hbs
title: Security
description: 'Security channel'
vars:
- name: preserve_original_event
required: true
show_user: true
title: Preserve original event
description: Preserves a raw copy of the original event, added to the field `event.original`
type: bool
multi: false
default: false
- input: httpjson
title: Windows Security Events via Splunk Enterprise REST API
description: Collect Security Events via Splunk Enterprise REST API
Expand All @@ -19,6 +28,14 @@ streams:
show_user: true
required: true
default: 10s
- name: preserve_original_event
required: true
show_user: true
title: Preserve original event
description: Preserves a raw copy of the original event, added to the field `event.original`
type: bool
multi: false
default: false
- name: search
type: text
title: Splunk search string
Expand Down
Expand Up @@ -33,6 +33,9 @@ tags:
{{#each tags as |tag i|}}
- {{tag}}
{{/each}}
{{#if preserve_original_event}}
- preserve_original_event
{{/if}}
{{#contains tags "forwarded"}}
publisher_pipeline.disable_host: true
{{/contains}}
Expand Down
@@ -1,2 +1,6 @@
name: System
condition: ${host.platform} == 'windows'
condition: ${host.platform} == 'windows'
tags:
{{#if preserve_original_event}}
- preserve_original_event
{{/if}}
Expand Up @@ -4,6 +4,11 @@ processors:
- set:
field: event.ingested
value: '{{_ingest.timestamp}}'
- remove:
field: event.original
if: "ctx?.tags == null || !(ctx.tags.contains('preserve_original_event'))"
ignore_failure: true
ignore_missing: true
on_failure:
- set:
field: "error.message"
Expand Down
17 changes: 17 additions & 0 deletions packages/system/data_stream/system/manifest.yml
Expand Up @@ -6,6 +6,15 @@ streams:
template_path: winlog.yml.hbs
title: System
description: 'Collect Windows system logs'
vars:
- name: preserve_original_event
required: true
show_user: true
title: Preserve original event
description: Preserves a raw copy of the original event, added to the field `event.original`
type: bool
multi: false
default: false
- input: httpjson
title: Windows System Events via Splunk Enterprise REST API
description: Collect System Events via Splunk Enterprise REST API
Expand All @@ -19,6 +28,14 @@ streams:
show_user: true
required: true
default: 10s
- name: preserve_original_event
required: true
show_user: true
title: Preserve original event
description: Preserves a raw copy of the original event, added to the field `event.original`
type: bool
multi: false
default: false
- name: search
type: text
title: Splunk search string
Expand Down
2 changes: 1 addition & 1 deletion packages/system/manifest.yml
@@ -1,7 +1,7 @@
format_version: 1.0.0
name: system
title: System
version: 0.12.4
version: 0.12.5
license: basic
description: System Integration
type: integration
Expand Down

0 comments on commit 885c9f7

Please sign in to comment.