Created
November 6, 2017 14:11
-
-
Save afreeland/3dfae01925b6b04f63f87f740f6f3531 to your computer and use it in GitHub Desktop.
Logstash - CSV sample
This file contains hidden or 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:\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