# Logstash\_KVFilter

**URL:** https://discuss.elastic.co/t/logstash-kvfilter/211605
**Category:** Logstash
**Created:** [December 12, 2019, 9:45am UTC](https://discuss.elastic.co/t/logstash-kvfilter/211605 "2019-12-12T09:45:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Raj\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj_kumar/32/25420_2.png) [@Raj\_Kumar](https://discuss.elastic.co/u/Raj_Kumar)
#### Post date: [December 12, 2019, 9:45am UTC](https://discuss.elastic.co/t/logstash-kvfilter/211605/1 "2019-12-12T09:45:51Z")

</div>

Hi There,

Am trying to split the fileds and values of this field

winlog.event\_data.RuleName: technique\_id=T1036,technique\_name=Masquerading

in two other separate fields where I can have technique id separately and technique name separately

filter {  
if "winlogbeat" in [tags] and [log\_name] == "Microsoft-Windows-Sysmon/Operational" {  
kv { source =\> "[winlog][event\_data][RuleName]" target =\> "[winlog][event\_data][RuleName]" field\_split =\> "," }  
}  
}

Could you please tell me what error am I making , I could'nt split these

---

<div class="post-metadata">

### Author: ![Raj\_Kumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/raj_kumar/32/25420_2.png) [@Raj\_Kumar](https://discuss.elastic.co/u/Raj_Kumar)
#### Post date: [December 13, 2019, 9:26am UTC](https://discuss.elastic.co/t/logstash-kvfilter/211605/2 "2019-12-13T09:26:44Z")

</div>

any help please ?

---

<div class="post-metadata">

### Author: ![ahmedmusaad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmedmusaad/32/60190_2.png) [@ahmedmusaad](https://discuss.elastic.co/u/ahmedmusaad)
#### Post date: [January 2, 2020, 2:56pm UTC](https://discuss.elastic.co/t/logstash-kvfilter/211605/3 "2020-01-02T14:56:49Z")

</div>

Hi Raj,

There a couple of things you need to change in your filter syntax to achieve the results you are looking for, try replacing your filter with this following one:

```
filter {
if ([winlog][channel] == "Microsoft-Windows-Sysmon/Operational") {
    if ([winlog][event_data][RuleName]) {
        kv {
            source => "[winlog][event_data][RuleName]"
            field_split => ","
            value_split => "="
            prefix => "mitre_"
            transform_key => "lowercase"
        }
    }
}
}

```

I have tested the filter above and it works, you will get the new fields with the information from the RuleName field. Feel feel to share any questions or thoughts.

---

<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: [January 30, 2020, 2:56pm UTC](https://discuss.elastic.co/t/logstash-kvfilter/211605/4 "2020-01-30T14:56:55Z")

</div>

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