Hello,
Maybe you can try this extractor config for the RAW input using regex.
(It will keep the original field names coming from the logs, so you don’t need to keep any of them manually extracting one by one…)
{
"extractors": [
{
"title": "KV",
"extractor_type": "copy_input",
"converters": [
{
"type": "tokenizer",
"config": {}
}
],
"order": 2,
"cursor_strategy": "copy",
"source_field": "message",
"target_field": "message",
"extractor_config": {},
"condition_type": "none",
"condition_value": ""
},
{
"title": "Remove level key",
"extractor_type": "regex_replace",
"converters": [],
"order": 1,
"cursor_strategy": "copy",
"source_field": "message",
"target_field": "message",
"extractor_config": {
"replacement": " ",
"regex": "level=(notice|information|warning|error|alert)"
},
"condition_type": "none",
"condition_value": ""
},
{
"title": "Remove initial numeric tag",
"extractor_type": "regex_replace",
"converters": [],
"order": 0,
"cursor_strategy": "copy",
"source_field": "message",
"target_field": "message",
"extractor_config": {
"replacement": " ",
"regex": "^(\\<\\d+\\>)"
},
"condition_type": "none",
"condition_value": ""
}
],
"version": "2.1.0-SNAPSHOT"
}
Maybe an improvement would be using the same extractor config to add a fortinet_ prefix in each key to avoid having to remove the level field from Fortinet logs (to avoid having issues with ingestion that is present in the versions I had contact =< 2.3)