Skip to content

Instantly share code, notes, and snippets.

@riccardone
Last active August 14, 2023 10:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riccardone/18c176dab737631c9a216e89b79acdb7 to your computer and use it in GitHub Desktop.
Save riccardone/18c176dab737631c9a216e89b79acdb7 to your computer and use it in GitHub Desktop.
Configuration example for Logstash: from csv to EventStore
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