# Using ELK, I'm unsure how to use right filter in logstash config file for pairs

**URL:** <https://discuss.elastic.co/t/using-elk-im-unsure-how-to-use-right-filter-in-logstash-config-file-for-pairs/153658>\
**Category:** Logstash\
**Created:** [October 23, 2018, 5:21pm UTC](https://discuss.elastic.co/t/using-elk-im-unsure-how-to-use-right-filter-in-logstash-config-file-for-pairs/153658 "2018-10-23T17:21:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_McGown](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Mark\_McGown](https://discuss.elastic.co/u/Mark_McGown)\
**Post date:** [October 23, 2018, 5:21pm UTC](https://discuss.elastic.co/t/using-elk-im-unsure-how-to-use-right-filter-in-logstash-config-file-for-pairs/153658/1 "2018-10-23T17:21:04Z")

</div>

I have a dollarVars term filled with things in this format...

Message 1:  
Header1|Value1|Header2|Value2|Header3|Value3|

Message 2:  
Header2|Value2|Header4|Value4|Header5|Value5|

Message 3:  
Header3|Value3|Header4|Value4|Header5|Value5|

Etc.

My current filter looks like:

filter {  
dissect {  
mapping =\> {  
"message" =\> "%{dateTime},%{id},%{stuff1},%{stuff2},%{stuff3},%{stuff4},%{stuff5},%{dollarVars}"  
}  
}

```
mutate {
convert => {
  "stuff1"=>"integer"
  "stuff2"=>"integer"
            }
       }

 date{ 
  match => ["dateTime", "yyyy/MM/dd HH:mm:ss"]
     }

```

}

What can I do to take my dissected dollarVars and break it up into the header with its respective value (the one to the right of each header)?

I suspect this would use the csv filter somehow using "|" instead of "," and somehow telling it each dollarVar odd column is a header and each even column goes with its respective (n-1) odd column.

---

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [October 24, 2018, 8:04pm UTC](https://discuss.elastic.co/t/using-elk-im-unsure-how-to-use-right-filter-in-logstash-config-file-for-pairs/153658/2 "2018-10-24T20:04:37Z")

</div>

Can you give us an example snippet of what's being ingested? I'm not 100% following the examples you made.

---

<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:** [November 21, 2018, 8:06pm UTC](https://discuss.elastic.co/t/using-elk-im-unsure-how-to-use-right-filter-in-logstash-config-file-for-pairs/153658/3 "2018-11-21T20:06:35Z")

</div>

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