Ingest Pipeline


I have am ingest pipeline that set within Elasticsearch ingest node, that takes the message field from a log file and splits it out.

During this I pull out the date which looks fine when it hits the document, but the index pattern is setting it as a string and not a date. is the a way I can get it to set as a date?

    "grok": {
      "field": "message",
      "patterns": [
        "%{} %{NOTSPACE:yum.state} %{NOTSPACE:yum.package}"
      "pattern_definitions": {
      "description": "Yum entry"
    "date": {
      "field": "",
      "formats": [
        "MMM dd HH:mm:ss"
      "target_field": "yum.datetime"

You need to define the mapping for your index and set the field as a date field.

Thank you for coming back to me.

I haven't carried out a mapping before, where is this setup?


You can GET your current mapping using

GET /yourindexname

And the adjust from there.

Thanks @stephenb - As im pulling the data in through filebeat, wil i need to update the mapping on every new index created for each release e.g. filebeat-7.11 then filebeat-7.12?

No you will use an index template :slight_smile: that matches the pattern of indices like


Think of a template as a mapping (and settings) that get applied to any index name that matches a pattern

Thanks. Had to wing it a little but got it working with your help :slight_smile:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.