Skip to content

Commit

Permalink
Fix multi-line string handling for config variable
Browse files Browse the repository at this point in the history
The default value for `fdr_parsing_script` is a multline line string. When the handlebar
template was evaluated this created invalid YAML. By changing the variable type to
'yaml' Kibana produces config that is valid. It looks like

    sqs.notification_parse_script: >-
          function parse(n) { var m = JSON.parse(n); var evts = []; var files =
          m.files; ...

I cannot find any documentation for the 'yaml' variable type so I hoping this is how it was
expected to be used.
  • Loading branch information
andrewkroh committed Feb 15, 2022
1 parent b8b2751 commit 225ff2f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion packages/crowdstrike/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.2.3"
changes:
- description: Change type of 'fdr_parsing_script' variable to 'yaml' that the multi-line value is treated as a string.
type: bugfix
link: https://github.com/elastic/integrations/pull/
- version: "1.2.2"
changes:
- description: Add Ingest Pipeline script to map IANA Protocol Numbers
Expand All @@ -8,7 +13,7 @@
changes:
- description: Fix issue with "Is FDR Queue" selector having no effect.
type: bugfix
link: https://github.com/elastic/integrations/pull/
link: https://github.com/elastic/integrations/pull/2653
- version: "1.2.0"
changes:
- description: Update to ECS 8.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fips_enabled: {{fips_enabled}}
proxy_url: {{proxy_url}}
{{/if}}
{{#if is_fdr_queue}}
sqs.notification_parse_script: {{fdr_parsing_script}}
sqs.notification_parsing_script.source: {{fdr_parsing_script}}
{{/if}}
{{#if tags.length}}
tags:
Expand Down
2 changes: 1 addition & 1 deletion packages/crowdstrike/data_stream/fdr/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ streams:
show_user: false
description: URL to proxy connections in the form of http[s]://<user>:<password>@<server name/ip>:<port>
- name: fdr_parsing_script
type: text
type: yaml
title: FDR Notification Parsing Script
multi: false
required: true
Expand Down
2 changes: 1 addition & 1 deletion packages/crowdstrike/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: crowdstrike
title: CrowdStrike Logs
version: 1.2.2
version: 1.2.3
description: Collect and parse falcon logs from Crowdstrike products with Elastic Agent.
type: integration
format_version: 1.0.0
Expand Down

0 comments on commit 225ff2f

Please sign in to comment.