title: Fluentd Elasticsearch Kibana logs dynamic index GEOPOINT mapping
body: <p>I am using EFK logging stack and have managed to set up fluentd filter and match configurations so that the tomcat access logs collected in Kibana all needed fields are there: IP, latitude, longitude, City, country code, etc. </p>
  
  <p>I have <code>curl -XPUT -H "Content-Type: application/json" --data @fluentd_mapping.json http://$host/fluentd/fluentd/_mapping</code> but it only affects the fluentd index. Not the dynamically created daily-log index <code>&lt;foo&gt;.access.logs.*</code> </p>
  
  <p>So my question is how to apply the mapping so that the geo_point type is effective for the daily log index? Thanks.</p>
  
  <p>I restarted the ES container, <code>curl -XPUT</code> the following mapping.json which is picked up by fluentd index but not the daily-log index:</p>
  
  <pre><code>{
      "fluentd": {
          "location_array": {
            "type": "geo_point"
          },
          "location_properties": {
            "type": "geo_point"
          },
          "location_string": {
            "type": "geo_point"
          },
      }
  }
  </code></pre>
  
  <p>Existing templates:</p>
  
  <pre><code>                "dynamic_templates": [{
      "kibana_index_template:.kibana": {
                  "dynamic_templates": [{
      "security-index-template": {
                  "dynamic_templates": [{
                          "path_match": "result\\.(input(\\..+)*|(transform(\\..+)*)|(actions\\.transform(\\..+)*))\\.search\\.request\\.(body|template)",
      "logstash-index-template": {
  </code></pre>
  
  <p>Existing index patterns:</p>
  
  <pre><code>        "index_patterns": [".monitoring-logstash-6-*"],
          "index_patterns": [".monitoring-kibana-6-*"],
          "index_patterns": [".ml-anomalies-*"],
          "index_patterns": [".kibana"],
          "index_patterns": [".ml-state"],
          "index_patterns": [".watches*"],
          "index_patterns": [".monitoring-beats-6-*"],
          "index_patterns": [".monitoring-es-6-*"],
          "index_patterns": [".security_audit_log*"],
          "index_patterns": [".ml-meta"],
          "index_patterns": [".security-*"],
          "index_patterns": [".triggered_watches*"],
          "index_patterns": [".watcher-history-9*"],
          "index_patterns": [".monitoring-alerts-6"],
          "index_patterns": [".ml-notifications"],
          "index_patterns": [".logstash"],
  </code></pre>
  
  <p>I added the following template but to no avail:</p>
  
  <pre><code>        "fluentd": {
                  "order": 0,
                  "index_patterns": ["myapp.access.logs*"],
                  "settings": {},
                  "mappings": {
                          "fluentd": {
                                  "properties": {
                                          "location_array": {
                                                  "type": "geo_point"
                                          },
                                          "location_properties": {
                                                  "type": "geo_point"
                                          },
                                          "location_string": {
                                                  "type": "geo_point"
                                          }
                                  }
                          }
                  },
                  "aliases": {}
          },
  </code></pre>
  
  <p>It's not picked up by myapp.access.logs-</p>