crowdsec/pkg/parser/tests/base-json-extract/test.yaml

20 lines
579 B
YAML
Raw Permalink Normal View History

2020-05-22 16:12:33 +00:00
#these are the events we input into parser
lines:
- Line:
Labels:
type: json-1
progrname: my_test_prog
2020-05-23 11:22:43 +00:00
Raw: '{"testfield": "some stuff", "log": "xxheader VALUE1 trailing stuff", "nested_1" : {"anarray" : ["foo","bar","xx1"], "xxx" : "zzzz"}}'
2020-05-22 16:12:33 +00:00
results:
- Meta:
other_field: some stuff
program: my_test_prog
Parsed:
message: xxheader VALUE1 trailing stuff
extracted_value: VALUE1
2020-05-23 11:22:43 +00:00
extracted_array_field: foo
extracted_array: '["foo","bar","xx1"]'
extracted_arrayfield_from_object: bar
2020-05-22 16:12:33 +00:00
Process: true