-
Notifications
You must be signed in to change notification settings - Fork 378
/
stream.yml.hbs
97 lines (97 loc) · 2.15 KB
/
stream.yml.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
paths:
{{#each paths as |path|}}
- {{path}}
{{/each}}
scan:
sort: filename
order: asc
exclude_files: ['\.gz$']
{{#if tags.length}}
tags:
{{else}}
{{#if preserve_original_event}}
tags:
{{/if}}
{{/if}}
{{#if preserve_original_event}}
- preserve_original_event
{{/if}}
{{#each tags as |tag|}}
- {{tag}}
{{/each}}
{{#contains "forwarded" tags}}
publisher_pipeline.disable_host: true
{{/contains}}
processors:
- add_locale: ~
{{#if enrich_metadata}}
- decode_json_fields:
fields: message
target: crowdstrike
- if:
contains:
log.file.path: aidmaster
then:
- cache:
backend:
capacity: {{metadata_cache_capacity}}
file:
id: aidmaster
write_interval: {{metadata_cache_write_interval}}
put:
ttl: {{metadata_ttl}}
key_field: crowdstrike.aid
value_field: crowdstrike
ignore_missing: true
{{#unless keep_metadata}}
- drop_event:
when:
contains:
log.file.path: aidmaster
{{/unless}}
else:
- if:
contains:
log.file.path: userinfo
then:
- cache:
backend:
capacity: {{metadata_cache_capacity}}
file:
id: userinfo
write_interval: {{metadata_cache_write_interval}}
put:
ttl: {{metadata_ttl}}
key_field: crowdstrike.UserSid_readable
value_field: crowdstrike
ignore_missing: true
{{#unless keep_metadata}}
- drop_event:
when:
contains:
log.file.path: userinfo
{{/unless}}
else:
- cache:
backend:
file:
id: aidmaster
get:
key_field: crowdstrike.aid
target_field: metadata.host
ignore_missing: true
- cache:
backend:
file:
id: userinfo
get:
key_field: crowdstrike.UserSid
target_field: metadata.user
ignore_missing: true
- drop_fields:
fields:
- crowdstrike
{{/if}}
{{#if processors}}
{{processors}}
{{/if}}