My sample data is like this and my config file is below. data not converted properly.
input {
file {
path => "/home/node/Copy/SDP/SDP-testdata/sdptestdata.csv"
start_position=> beginning
#sincedb_path => "/dev/null"
}
}
filter {
if [message] =~ /^\s*$/ { drop { } }
if [message] =~ /Press/ { drop {} }
if [message] =~ "-"{mutate {replace => ["message", "float" ]}}
csv {
separator => " "
convert =>
{
"SDP.succrate" => "float"
"SDP.Failrate" => "float"
"SDP.Rejectrate" => "integer"
"SDP.Retransmission.Detected" => "integer"
"SDP.Duplicate.Answered" => "float"
"SDP.Throughput.persec" => "float"
}
columns => ["SDP.Incident.Date","SDP.Attributes.Name","SDP.succrate","SDP.Failrate","SDP.Rejectrate", "SDP.Retransmission.Detected","SDP.Duplicate.Answered", "SDP.Throughput.persec","SDP.RT.Avg","SDP.RT.Min","SDP.RT.Max"]
}
date {
match => [ "SDP.Incident.Date" , "dd-mm-yy HH:mm:ss" ]
}
mutate {convert => ["SDP.RT.Avg", "float"]}
mutate {convert => ["SDP.RT.Min", "float"]}
mutate {convert => ["SDP.RT.Max", "float"]}
}
output {
stdout {codec=>rubydebug}
}