# How extract a value from grock pattern in a new field

**URL:** https://discuss.elastic.co/t/how-extract-a-value-from-grock-pattern-in-a-new-field/342855
**Category:** Kibana
**Created:** [September 12, 2023, 2:48pm UTC](https://discuss.elastic.co/t/how-extract-a-value-from-grock-pattern-in-a-new-field/342855 "2023-09-12T14:48:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Amani188](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Amani188](https://discuss.elastic.co/u/Amani188)
#### Post date: [September 12, 2023, 2:48pm UTC](https://discuss.elastic.co/t/how-extract-a-value-from-grock-pattern-in-a-new-field/342855/1 "2023-09-12T14:48:39Z")

</div>

Hi,  
I'm trying to create new field called Systeme from a grock pattern whitch match the value of Systeme but it's always empty does anyone have an idea about how to do that.  
I'm using ingest pipeline like this:

```
"grok": {
  "field": "log.file.path",
  "patterns": [
    "%{WORD:disk}:\\\\Test\\\\%{WORD:Systeme}\\\\JBoss"
  ],
  "on_failure": [
    {
      "set": {
        "field": "error",
        "value": "{{error}} || {{ _ingest.on_failure_message }}"
      }
    }
  ]
}

```

},  
{  
"set": {  
"field": "Systeme",  
"value": "{{Systeme}}"  
}  
},

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [September 12, 2023, 7:38pm UTC](https://discuss.elastic.co/t/how-extract-a-value-from-grock-pattern-in-a-new-field/342855/2 "2023-09-12T19:38:10Z")

</div>

Hi @Amani188

You need to provide a couple sample documents that you want to pass through the ingest pipeline and show us the expected results

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [October 10, 2023, 7:38pm UTC](https://discuss.elastic.co/t/how-extract-a-value-from-grock-pattern-in-a-new-field/342855/3 "2023-10-10T19:38:39Z")

</div>

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