# Rs.8000.00 withdrawn from ATM using logstash

**URL:** <https://discuss.elastic.co/t/rs-8000-00-withdrawn-from-atm-using-logstash/265778>\
**Category:** Elasticsearch\
**Created:** [March 1, 2021, 10:34am UTC](https://discuss.elastic.co/t/rs-8000-00-withdrawn-from-atm-using-logstash/265778 "2021-03-01T10:34:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![padamrai](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@padamrai](https://discuss.elastic.co/u/padamrai)\
**Post date:** [March 1, 2021, 10:34am UTC](https://discuss.elastic.co/t/rs-8000-00-withdrawn-from-atm-using-logstash/265778/1 "2021-03-01T10:34:48Z")

</div>

how to get amount from above sentence and convert into integer.

---

<div class="post-metadata">

**Author:** ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)\
**Post date:** [March 1, 2021, 11:48am UTC](https://discuss.elastic.co/t/rs-8000-00-withdrawn-from-atm-using-logstash/265778/2 "2021-03-01T11:48:33Z")

</div>

Hi,

You can use the [grok filter](https://www.elastic.co/guide/en/logstash/master/plugins-filters-grok.html) for example using the following pattern:

```auto
Rs.%{DATA:AMOUNT} withdrawn from ATM using logstash

```

Now, you have the value but it is still a string. For the number conversion you can then use the [mutate filter](https://www.elastic.co/guide/en/logstash/master/plugins-filters-mutate.html#plugins-filters-mutate-convert).

Best regards  
Wolfram

---

<div class="post-metadata">

**Author:** ![padamrai](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@padamrai](https://discuss.elastic.co/u/padamrai)\
**Post date:** [March 1, 2021, 12:10pm UTC](https://discuss.elastic.co/t/rs-8000-00-withdrawn-from-atm-using-logstash/265778/3 "2021-03-01T12:10:19Z")

</div>

Thank You Wolfram,  
You saved my time, now it is working properly.

---

<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:** [March 29, 2021, 12:11pm UTC](https://discuss.elastic.co/t/rs-8000-00-withdrawn-from-atm-using-logstash/265778/4 "2021-03-29T12:11:12Z")

</div>

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