# How can i grep the thread names using timelion query

**URL:** <https://discuss.elastic.co/t/how-can-i-grep-the-thread-names-using-timelion-query/196938>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [August 27, 2019, 11:21am UTC](https://discuss.elastic.co/t/how-can-i-grep-the-thread-names-using-timelion-query/196938 "2019-08-27T11:21:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![satyam2593](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@satyam2593](https://discuss.elastic.co/u/satyam2593)\
**Post date:** [August 27, 2019, 11:21am UTC](https://discuss.elastic.co/t/how-can-i-grep-the-thread-names-using-timelion-query/196938/1 "2019-08-27T11:21:48Z")

</div>

Hey i want to grep the "Abandoned connection cleanup thread" using the timelion query. i need regex to fetch the thread names as label. Here the thread names are dynamically changing

here is the input: q:\* \> thread\_name:Abandoned connection cleanup thread \> max(memory\_utilisation)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/8/e8bb89e0e16755c12bf6c4b2ad8e6b8722567f2f.png)

The label is showing as above when i write query .es(index=talend\_dev\_thread\_level\_heap\*,split='thread\_name:7',metric=max:memory\_utilisation)

For the above query , i need to add label with regex expression that should give only dynamic thread names like  
Abandoned connection cleanup thread

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [August 27, 2019, 9:17pm UTC](https://discuss.elastic.co/t/how-can-i-grep-the-thread-names-using-timelion-query/196938/2 "2019-08-27T21:17:34Z")

</div>

This discusses the usage of `.label()` which may be helpful for you - [Timelion: how generate .label() dynamically?](https://discuss.elastic.co/t/timelion-how-generate-label-dynamically/85072)

---

<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:** [September 24, 2019, 9:17pm UTC](https://discuss.elastic.co/t/how-can-i-grep-the-thread-names-using-timelion-query/196938/3 "2019-09-24T21:17:41Z")

</div>

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