Hi, I am new to ELK; I am trying to get my first example working but Logstash doesn't seem to like my date format.
stock.conf
input {
file {
path => ["/Users/alialaie/Desktop/Examples/Data/Intro/stock.csv"]
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ","
columns => ["Date","Open","High","Low","Close","Volume","Adj Close"]
}
date {
match => ["Date", "dd-MM-yyyy HH:mm:ss"]
}
mutate {convert => ["High", "float"]}
mutate {convert => ["Open", "float"]}
mutate {convert => ["Low", "float"]}
mutate {convert => ["Close", "float"]}
mutate {convert => ["Volume", "float"]}
mutate {convert => ["Adj Close", "float"]}
}
output {
elasticsearch {
hosts => "http://localhost:9200"
action => "index"
index => "stock"}
}
Here is the sample of stock.csv
Date,Open,High,Low,Close,Volume,Adj Close^M
02-04-2015 12:01:01,125.029999,125.559998,124.190002,125.32,32220100,122.294596^M
01-04-2015 12:01:01,124.82,125.120003,123.099998,124.25,40621400,121.250427^M
31-03-2015 12:01:01,126.089996,126.489998,124.360001,124.43,42090600,121.426082^M
30-03-2015 12:01:01,124.050003,126.400002,124,126.370003,47099700,123.31925^M
27-03-2015 12:01:01,124.57,124.699997,122.910004,123.25,39546200,120.274569^M
26-03-2015 12:01:01,122.760002,124.879997,122.599998,124.239998,47572900,121.240667^M
25-03-2015 12:01:01,126.540001,126.82,123.379997,123.379997,51655200,120.401428^M
24-03-2015 12:01:01,127.230003,128.039993,126.559998,126.690002,32842300,123.631525^M
23-03-2015 12:01:01,127.120003,127.849998,126.519997,127.209999,37709700,124.138968^M
Any help would be appreciated.