Skip to content

Instantly share code, notes, and snippets.

@afreeland
Created November 6, 2017 14:11
Show Gist options
  • Save afreeland/3dfae01925b6b04f63f87f740f6f3531 to your computer and use it in GitHub Desktop.
Save afreeland/3dfae01925b6b04f63f87f740f6f3531 to your computer and use it in GitHub Desktop.
Logstash - CSV sample
input {
file {
path => "C:\Users\afreeland\Documents\GitHub\ElasticImport\conf\appointment1.txt"
start_position => beginning
}
}
filter {
csv {
columns => [
"evt",
"aId",
"dateTime",
"message",
"userId",
"visitId",
"accountNumber",
"location"
]
separator => "|"
}
date {
match => ["dateTime", "ISO8601"]
}
}
output {
elasticsearch {
hosts => ["http://localhost:9200"]
action => "index"
index => "walkthrough-%{+YYYY.MM}"
}
stdout {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment