Hello,
I'm starting to use ELK, but I have a problem to convert fields... always, all the fields types are string.
Here an example of log line:
2016-05-10 19:44:37 123 12 199
and here logstash config file:
input { file { type => "platform" path => "/home/vagrant/platform.log" start_position => beginning } } filter { if [type]=="platform" { grok { match => [ "message", "%{TIMESTAMP_ISO8601:timestamp} %{NUMBER:id:int} %{NUMBER:platform_type:int} %{NUMBER:value:int}"] } mutate { convert => { "value" => "integer" "platform_type" => "integer" "id" => "integer" } } } } output { elasticsearch { hosts => ["localhost:9200"] index => "platform-%{+YYYY-MM-dd}" } }
and when I test it, using
curl -XGET 'http://localhost:9200/platfrom-*'
return
{"platfrom-2016-05-10":{"aliases":{},"mappings":{"platfrom":{"properties":{"@timestamp":{"type":"date","format":"strict_date_optional_time||epoch_millis"},"@version":{"type":"string"},"host":{"type":"string"},"id":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"platfrom_type":{"type":"string"},"timestamp":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}},"settings":{"index":{"creation_date":"1462902506058","number_of_shards":"5","number_of_replicas":"1","uuid":"qs60O-FRSzO5rGv2E0nEzQ","version":{"created":"2030299"}}},"warmers":{}}}
All fields are strings...
I don't know what I am doing bad, can anyone help me?
Thanks