Last active
August 14, 2023 10:40
-
-
Save riccardone/18c176dab737631c9a216e89b79acdb7 to your computer and use it in GitHub Desktop.
Configuration example for Logstash: from csv to EventStore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
file { | |
path => ["C:/inbound/*/*.csv"] | |
start_position => "beginning" | |
} | |
} | |
filter { | |
fingerprint { | |
source => "message" | |
target => "[@metadata][fingerprint]" | |
method => "UUID" | |
} | |
} | |
output { | |
stdout { codec => rubydebug } | |
http { | |
url => "http://localhost:2113/streams/inbound-data" | |
http_method => "post" | |
content_type => "application/vnd.eventstore.events+json" | |
format => "message" | |
message => '[ | |
{ | |
"eventType": "InboundDataReceived", | |
"eventId": "%{[@metadata][fingerprint]}", | |
"data": { "message": "%{message}" }, | |
"metadata": { "host": "%{host}", "path": "%{path}" } | |
} | |
]' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment