I'm trying to setup logstash, elasicsearch and Kibana for visualization the logs. The log should be send through TCP to logstash, filtered, output to ES-index and than shown in kibana.
The message i'm sending to logstash :
msg_to_tcp="id=1324 type=error name=system_name"
logstash.conf:
input{
tcp {
host => localhost
port => 55555
}
}
filter {
kv {}
mutate {
convert => ["id" , "integer"]
}
}
output {
elasticsearch {
host => localhost
port => 9200
}
}
usage: logstash 1.4.2 , elasticsearch 1.4.4 and kibana 4
Unfortunately the converting of id to an integer doesn't work. Kibana shows me that it is still a string.
I also tried to use in kibana the "scripted filters", it just causes error.
Integer.parseInt(doc["id"].value)
Can someone help me to convert the "id" to integer?