# Query on Grok & Mutate plugins with Logstash

**URL:** <https://discuss.elastic.co/t/query-on-grok-mutate-plugins-with-logstash/206293>\
**Category:** Logstash\
**Created:** [November 3, 2019, 2:43pm UTC](https://discuss.elastic.co/t/query-on-grok-mutate-plugins-with-logstash/206293 "2019-11-03T14:43:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![angryninja](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@angryninja](https://discuss.elastic.co/u/angryninja)\
**Post date:** [November 3, 2019, 2:43pm UTC](https://discuss.elastic.co/t/query-on-grok-mutate-plugins-with-logstash/206293/1 "2019-11-03T14:43:55Z")

</div>

Hello,

I am trying to match a pattern ES document which is being ingested via Logstash.  
Pattern is duration defined in hours like **PT(Hours)H**.  
I am using following as part of the logstash conf but I don't see any fields being added to the document and don't see anything in the logs as well.  
Can you please let me know what am I missing here?

```
grok{
  match => ["message", "PT%{NUMBER:DurationHours}H"]
}	

mutate{
add_field => { "NewDurationHrs" => "%{DurationHours}" }
  }
```

---

<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:** [December 1, 2019, 2:43pm UTC](https://discuss.elastic.co/t/query-on-grok-mutate-plugins-with-logstash/206293/2 "2019-12-01T14:43:58Z")

</div>

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