1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
input {
stdin {
codec => json_lines {
charset => "UTF-8"
}
}
}
filter {
date {
# Parse Eliot timestamp filed into the special @timestamp field Logstash
# expects:
match => [ "timestamp", "UNIX" ]
target => ["@timestamp"]
}
}
output {
# Stdout output for debugging:
stdout {
codec => rubydebug
}
elasticsearch {
# We make the document id unique (for a specific index/mapping type pair) by
# using the relevant Eliot fields. This means replaying messages will not
# result in duplicates, as long as the replayed messages end up in the same
# index.
document_id => "%{task_uuid}_%{task_level}"
}
}
|