That was my first try.
I am using version 5.1 and it only takes into account the last grok.
"processors": [
{
"grok": {
"field": "message",
"patterns": [
"%{STATUS:status};\\s+%{WORD:service};\\s+%{MSG:message}\\|\\s+%{WORD:key01}=%{NUMBER:value01}.*",
"%{STATUS:status};\\s+%{WORD:service};\\s+%{GREEDYDATA:message}"
],
"pattern_definitions": {
"STATUS": "\\d+",
"MSG": ".+?"
}
},
"grok": {
"field": "source",
"patterns": [".+?%{TIMESTAMP:timestamp}.+"],
"pattern_definitions" : {
"TIMESTAMP" : "[0-9]+"}
}
,
"date" : {
"field" : "timestamp",
"formats" : ["UNIX_MS"]
},
"remove": {
"field": "timestamp"
}
}
]