The data types are controlled by the Elasticsearch index template. Packetbeat provides its own when it first connects to Elasticsearch. But you could customize it.
Install the template to Elasticsearch as per this instructions here.
The template is used to define the mapping for newly created indices. So it won't affect any existing indices (you can delete them if you don't mind losing the data).
You can validate the mappings with:
GET packetbeat-*/_mapping/field/client_ip GET packetbeat-*/_mapping/field/ip
Note that with the upcoming release of Elastic Stack 7.0, most of the IP fields will have moved to the ip datatype, during the transition to the Elastic Common Schema.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.