# Can dissect filter be used, when message contains unknown number of names separated by comma

**URL:** <https://discuss.elastic.co/t/can-dissect-filter-be-used-when-message-contains-unknown-number-of-names-separated-by-comma/153581>\
**Category:** Logstash\
**Created:** [October 23, 2018, 10:47am UTC](https://discuss.elastic.co/t/can-dissect-filter-be-used-when-message-contains-unknown-number-of-names-separated-by-comma/153581 "2018-10-23T10:47:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Preben\_Nilsson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/preben_nilsson/32/36826_2.png) [@Preben\_Nilsson](https://discuss.elastic.co/u/Preben_Nilsson)\
**Post date:** [October 23, 2018, 10:47am UTC](https://discuss.elastic.co/t/can-dissect-filter-be-used-when-message-contains-unknown-number-of-names-separated-by-comma/153581/1 "2018-10-23T10:47:04Z")

</div>

Hi experts.

I am trying to use the dissect filter to parse the below line:

2018-09-24 13:22:38,562 | tshadm | UserAdmin,Admin,CryptoAdmin | 10.128.13.207 | USER | LOGIN\_ATTEMPT | | Login was successful

So far my filter looks lie this:

```
dissect {
    mapping => {
        "message" => '%{source_log_timestamp},%{+source_log_timestamp/2} | %{user} | %{roles} | %{ip} | %{component} | %{event} | %{eventdetailid} | %{log_message}'
    }
}

```

My problem is that the "roles" field can contain an unknown number og strings separated by comma (,).  
Is it possible to parse the roles with the dissect filter, or will I have to grok it?

---

<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 20, 2018, 10:47am UTC](https://discuss.elastic.co/t/can-dissect-filter-be-used-when-message-contains-unknown-number-of-names-separated-by-comma/153581/2 "2018-11-20T10:47:05Z")

</div>

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