Hi team ES...
Can anyone help me how to convert a string to ip datatype ,I have already indexed huge data... As I am new to ES ,i couldn't understand solutions to similar situation
sample data
//
current format
string ,date,string,sting,integer,string
// 10.8.1.18,01-08-2019 00:00:21,CURRENT,Idea/Vodafone,325 KB/s
10.8.1.18,01-08-2019 00:30:19,CURRENT,Idea/Vodafone,401 KB/s
10.8.1.18,01-08-2019 01:00:17,CURRENT,Idea/Vodafone,607 KB/s
10.8.1.18,01-08-2019 01:30:16,CURRENT,Idea/Vodafone,627 KB/s
10.8.1.18,01-08-2019 02:00:17,CURRENT,Idea/Vodafone,549 KB/s //
required format
ip ,date,string,sting,integer,string
my logstash config file content is
// input {
file {
path => "/home/bibin/logs///speed.csv"
max_open_files => 17000
start_position => "beginning"
sincedb_path => "/home/bibin/ALL/since_speed.db"
}
}
filter {
#10.8.1.18,05-07-2019 14:00:13,CURRENT,Idea/Vodafone,0 KB/s
#10.8.1.18,05-07-2019 14:30:22,CURRENT,Idea/Vodafone,254 KB/s
dissect {
mapping => {
"message" => "%{ip},%{occured_instant},%{time_slot},%{provider},%{speed} %{unit}"
}
}
date {
match => [ "occured_instant", "dd-MM-yyyy HH:mm:ss" ]
target => "occured_date"
}
mutate {
convert => {
"speed" => "integer"
}
}
}
output {
elasticsearch {
hosts => "192.168.0.12:9200"
index => "speed"
document_type => "speed_bbb"
}
stdout {}