Hi - I am very new to logstash. Is there a way on how I can send the output into another pipeline one at a time, with the unique field "somefield"? "somefield" values are from UUID function.
CODE
#input ODX files from local path file
input {
file { path => "/Users/sample.odx"
start_position => "beginning"
sincedb_path => "NUL"
codec => multiline {
pattern => "^#----- Start Task -----"
negate => true
what => "previous"
max_lines => 4000
}
}
}
filter{
mutate { add_field => {"somefield" => " "} }
uuid {
target => "somefield"
overwrite => true
}
}
#output JSON File in local
output{
pipeline {
send_to => [data_transform]
}
}
current output:
{
"@version": "1",
"@timestamp": "2020-03-14T02:36:25.441Z",
"message": "#Money Exchange Rate\r\n250\r\n#Date of Export\r\nWed Jan 20 09:40:12 2018\r\n#Current Exchange\r\nSGDUSD\r\n#MoneyCounter\r\n207 \r",
"tags": [
"multiline"
],
"host": "BD001A2A",
"somefield": "c657e-65e2-4312-a015-e61"
}{
"@version": "1",
"@timestamp": "2020-03-14T02:36:25.497Z",
"message": "#----- Start Task -----\r\n\r\n#Location\r\nOrchard Road\\Singapore\\01ACVB\\125\r\n#Counter ID\r\n7008\r",
"tags": [
"multiline"
],
"host": "BD001A2A",
"somefield": "c9c6a2-fb81-435f-8a31-3728"
}{
"@version": "1",
"@timestamp": "2020-03-14T02:37:02.809Z",
"message": "#----- Start Task -----\r\n\r\n#Location\r\nDotonburi\\Japan\\98CVBS\\112\r\n#Counter ID\r\n9001\r",
"tags": [
"multiline"
],
"host": "BD001A2A",
"somefield": "28a5c-0cd7-4b89-bb7f-fff"
}
Thanks in advance!