Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/zeek/_dev/deploy/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
version: '2.3'
services:
splunk-mock:
image: docker.elastic.co/observability/stream:v0.5.0
ports:
- 8080
volumes:
- ./http-mock-config.yml:/config.yml
environment:
PORT: 8080
command:
- http-server
- --addr=:8080
- --config=/config.yml
zeek:
image: alpine
volumes:
Expand Down
721 changes: 721 additions & 0 deletions packages/zeek/_dev/deploy/docker/http-mock-config.yml

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions packages/zeek/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "0.7.4"
changes:
- description: Add system test for httpjson Splunk input.
type: enhancement
link: https://github.com/elastic/integrations/pull/1108
- version: "0.7.3"
changes:
- description: Make event.original optional
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: httpjson
service: splunk-mock
vars:
url: http://{{Hostname}}:{{Port}}
username: test
password: test
data_stream:
vars:
preserve_original_event: true
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ processors:
ignore_empty_value: true
ignore_failure: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.host
target_field: host.name
ignore_missing: true
- set:
field: host.name
copy_from: _temp_.json.result.host
ignore_empty_value: true
if: 'ctx?._temp_?.json?.result != null && ctx?._temp_?.json?.ts == null'
- rename:
field: _temp_.json.result.source
target_field: log.file.path
Expand Down
Loading
⌂ 换网址