{
  "template": {
    "mappings": {
      "dynamic_templates": [
        {
          "ip_address": {
            "path_match": "*.ip",
            "mapping": {
              "type": "ip",
              "fields": {
                "keyword": {
                  "ignore_above": 45,
                  "type": "keyword"
                }
              }
            },
            "match_mapping_type": "string"
          }
        },
        {
          "port": {
            "path_match": "*.port",
            "path_unmatch": "*.data.port",
            "mapping": {
              "type": "integer",
              "fields": {
                "keyword": {
                  "ignore_above": 6,
                  "type": "keyword"
                }
              }
            }
          }
        },
        {
          "strings": {
            "mapping": {
              "type": "keyword"
            },
            "match_mapping_type": "string"
          }
        }
      ]
    }
  }
}