# Grok filter on massive log

**URL:** https://discuss.elastic.co/t/grok-filter-on-massive-log/187254
**Category:** Logstash
**Created:** [June 25, 2019, 7:46am UTC](https://discuss.elastic.co/t/grok-filter-on-massive-log/187254 "2019-06-25T07:46:13Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![manosmustang](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@manosmustang](https://discuss.elastic.co/u/manosmustang)
#### Post date: [June 25, 2019, 7:46am UTC](https://discuss.elastic.co/t/grok-filter-on-massive-log/187254/1 "2019-06-25T07:46:13Z")

</div>

Hello,

Newbie at Grok and I want to ask the below

I have a big log from weblogic such as:

2019-06-24 11:56:25,782 [[ACTIVE] ExecuteThread: '333' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR motive.utilities.javascript.JavaScriptLogger - PARPINJO {deviceManageable=false, accountId2=, datatype=isam, primaryNumber=111111111, subscriptionType=, serialNumber=, accountstatus=Location: 000, ID: 2222, firstPhase=yes, ngnType=NOKIA, csrLogin=user, beaEquipmentSerialNum=null, ElementName=York, Slot=19, LT=16, Port=27

I am trying to test it through [grokdebug.herokuapp.com](http://grokdebug.herokuapp.com)

What I want is to filter 2 or more fields.

When I try one of them is working

csrLogin=(?[a-x]{,10})

{  
"csrLogin": [  
[  
"test"  
]  
]  
}

How can I add next to it another one? I don't want to be the next field (e.g. csrLogin=user, beaEquipmentSerialNum=null)

Just say that I want the field -\> Port=27

such as

csrLogin=(?[a-x]{,10}) & **Port=(?[a-x]{,10})**

Is it possible?

Thank you all

---

<div class="post-metadata">

### Author: ![sjabiulla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sjabiulla/32/48429_2.png) [@sjabiulla](https://discuss.elastic.co/u/sjabiulla)
#### Post date: [June 25, 2019, 8:09am UTC](https://discuss.elastic.co/t/grok-filter-on-massive-log/187254/2 "2019-06-25T08:09:24Z")

</div>

If you just want to extract all the fields from the log, then you can simply use [kv](https://www.elastic.co/guide/en/logstash/current/plugins-filters-kv.html) filter. That will convert keys available in log as fields in output.

If you want to hold the other info that's available in the log, then the combination of Grok & kv filter also will work

---

<div class="post-metadata">

### Author: ![manosmustang](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@manosmustang](https://discuss.elastic.co/u/manosmustang)
#### Post date: [June 25, 2019, 1:14pm UTC](https://discuss.elastic.co/t/grok-filter-on-massive-log/187254/3 "2019-06-25T13:14:41Z")

</div>

i do not want to extract all the fields. just some of them. any ideas?

---

<div class="post-metadata">

### Author: ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)
#### Post date: [June 25, 2019, 2:18pm UTC](https://discuss.elastic.co/t/grok-filter-on-massive-log/187254/4 "2019-06-25T14:18:15Z")

</div>

Use a kv filter.

```
kv { include_keys => ["beaEquipmentSerialNum", "csrLogin"] }
```

---

<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: [July 23, 2019, 2:18pm UTC](https://discuss.elastic.co/t/grok-filter-on-massive-log/187254/5 "2019-07-23T14:18:26Z")

</div>

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