0

I am using ELK stack with filebeat. I am using a default template for mapping. I am not getting all needed fields as "indexed"

Here is my mapping file,

 {
  "mappings": {
    "_default_": {
      "_all": {
        "enabled": true,
        "norms": {
          "enabled": false
        }
      },
      "dynamic_templates": [
        {
          "template1": {
            "mapping": {
              "doc_values": true,
              "ignore_above": 1024,
              "index": "not_analyzed",
              "type": "{dynamic_type}"
            },
            "match": "*"
          }
        }
      ],
      "properties": {
        "@timestamp": {
          "type": "date"
        },
        "offset": {
          "type": "long",
          "doc_values": "true"
        }
      }
    }
  },
  "settings": {
    "index.refresh_interval": "5s"
  },
  "template": "filebeat-*"
}

Here is my config file for output.

output {
  elasticsearch {
    hosts => ["localhost:9200"]
    sniffing => true
    manage_template => false
    index => "%{[@metadata][beat]}-%{+YYYY.MM.dd}"  
    document_type => "%{[@metadata][type]}"
  }
}

Let's say I want a field name channelas an indexed field. How to modify the template?

Bhargav Patel
  • 151
  • 2
  • 10

0 Answers0