logstash-plugins / logstash-filter-grok

Grok plugin to parse unstructured (log) data into something structured.
https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html
Apache License 2.0
124 stars 98 forks source link

Add support of IP elasticsearch mapping type #51

Open maximpashuk opened 9 years ago

maximpashuk commented 9 years ago

I am using logstash 1.5.2 Currently I can use pattern %{NUMBER:response:int} and resulting elasticsearch document will have mapping "response": { "type": "long" }, Instead of default mapping type string.

Documentation (https://www.elastic.co/guide/en/logstash/master/plugins-filters-grok.html) sad that "Currently the only supported conversions are int and float."

For IP addresses elasticsearch have special IP mapping type https://www.elastic.co/guide/en/elasticsearch/reference/1.7/mapping-ip-type.html

Can IP mapping type also be supported in grok filter for logstash ? Its will be cool to use patterns like %{IPV4:IP:ip} and have documents with ip mapping type