Hi everyone!
I'm sending Json data from logstash which are visible on kibana :
{
"modu" => "LORA",
"data" => "",
"ack" => false,
"freq" => 868.1,
"codr" => "4/5",
"opts" => "02",
"datr" => "SF7BW125",
"@version" => "1",
"host" => "192.168.69.241",
"mhdr" => "8002000000011700",
"seqn" => 23,
"appeui" => "00-00-00-00-00-00-00-10",
"timestamp" => "2017-03-23T12:58:49.727570Z",
"headers" => {
"http_accept" => "text/plain",
"content_type" => "application/json",
"request_path" => "/Lora/Nemeus",
"http_version" => "HTTP/1.1",
"http_connection" => "close",
"http_transfer_encoding" => "",
"request_method" => "PUT",
"http_host" => "192.168.69.112:8080",
"request_uri" => "/Lora/Nemeus",
"content_length" => "8"
},
"rssi" => -15,
"cls" => 0,
"rfch" => 0,
"tmst" => 2852202491,
"adr" => false,
"deveui" => "70-b3-d5-32-60-00-01-e6",
"@timestamp" => 2017-03-23T12:59:51.044Z,
"size" => 0,
"port" => 162,
"lsnr" => 10.0,
"chan" => 0
}
Originally, the "lsnr" and "freq" field was a string, but on the logstash conf file I've changed this parameter :
input { http { } }
filter {
mutate {
convert => {"lsnr" => "float"}
convert => {"freq" => "float"}
}
}
output {
elasticsearch { hosts => ["localhost:9200"] }
stdout { codec => rubydebug }
}
So on logstash logs as showed above, the data are float values, but once it's sent to kibana lsnr and freq are text again. I've tried to rebuild the index, without success
I've tried to change the type of those two fields on kibana index pattern -> controls-> format but float is not proposed.
I dont know why in logstash the parsing is correct and in kibana those two values are recognized back as text.
Thanks