Hi all,
I want to convert a String to be used in addition to @timestamp. Please help me as to how I do it.
I used the "date" filter as mentioned in lot of posts but was unable to get it working.
My message:
message:1488479436.576,2017-03-02 10:02:35.788,867 @version:1 @timestamp:March 30th 2017, 23:48:14.050 path:/home/abi/TOTAL_FD_mp.csv host:abi type:csv time/s:1488479436.576 date and time:2017-03-02, 10:02:35.788 open FDs:867 Date:1488479436.576 Open:2017-03-02 10:02:35.788 High:867 _id:AVsjHy-8wPycLm9WrZ7d _type:csv _index:tester _score:
I want to query based on "2017-03-02 10:02:35.788" etc. So which I assume means converting the string into a new timestamp.
I tried this but doesn't help.
input {
file {
path => "/home/abi/TOTAL_FD_mp.csv"
type => "csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ","
columns => ["time/s","date and time","open FDs"]
}
mutate {
convert => ["open FDs", "integer"]
}
date {
match => ["date and time","yyyy-MM-dd HH::mm:ss.SSS" ]
}
}
output {
elasticsearch {
hosts => "localhost"
action => "index"
workers => 1
index => "in7"
}
stdout { codec => rubydebug }
}