Search code examples
elasticsearchmappingwiresharkpacketbeat

How to PUT GET or POST a new Index Elasticsearch mapping


Good day my dear internet companions

In this day, I would like to know the way to specify an Elasticsearch mapping, or create one. My aim is to know the exact way to create an Elasticsearh mapping, because I have seen code like this:

PUT _template/packets
{
  "mappings": {
    "doc": { 
      "properties": { 
        "title":    { "type": "text"  }, 
        "name":     { "type": "text"  }, 
        "age":      { "type": "integer" },  
        "created":  {
          "type":   "date", 
          "format": "strict_date_optional_time||epoch_millis"
        }
      }
    }
  }
}

but I just don´t understand where I must insert a command like that, I wonder if I should type in a Terminal or in a file. If it helps, I'm using Ubuntu 16 x64, and I already have Packetbeat, Metricbeat, and Filebeat working. My aim is to have working Analyzing network packets using Wireshark, packetbeat and Elasticsearch, as taught here: https://www.elastic.co/blog/analyzing-network-packets-with-wireshark-elasticsearch-and-kibana

I wish you my best regards.


Solution

  • That command can be put in Kibana https://www.elastic.co/products/kibana. After you install it, open Kibana in http://localhost:5601 (local) and click Dev Tools menu.

    enter image description here