# Timelion visualisation: Sort and limit RabbitMQ queue entries

**URL:** <https://discuss.elastic.co/t/timelion-visualisation-sort-and-limit-rabbitmq-queue-entries/196490>\
**Category:** Kibana\
**Tags:** timelion\
**Created:** [August 23, 2019, 10:14am UTC](https://discuss.elastic.co/t/timelion-visualisation-sort-and-limit-rabbitmq-queue-entries/196490 "2019-08-23T10:14:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wouter.vandenheede](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wouter.vandenheede/32/47736_2.png) [@wouter.vandenheede](https://discuss.elastic.co/u/wouter.vandenheede)\
**Post date:** [August 23, 2019, 10:14am UTC](https://discuss.elastic.co/t/timelion-visualisation-sort-and-limit-rabbitmq-queue-entries/196490/1 "2019-08-23T10:14:10Z")

</div>

Hello,

I use the RabbitMQ module in Metricbeat to collect Metrics.  
I made a Timelion expression of that and I am faced with the following problem:

I would like to sort the number of queues (that have been blurred) by the number of messages present in this queue and only show the top 10 of them (now 100).

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/d/0dd6339f9e0bf636a1309d556bfd3ed1f8eab2e4.jpeg)

```
.es(index=metricbeat-*, timefield=@timestamp, metric=max:rabbitmq.queue.messages.total.count, split=rabbitmq.queue.name:100).label('$1', '.*:(.*)>.*').yaxis(label='Messages')

```

Can someone help me write this query?

Thanks,  
Wouter

---

<div class="post-metadata">

**Author:** ![jen-huang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jen-huang/32/74327_2.png) [@jen-huang](https://discuss.elastic.co/u/jen-huang)\
**Post date:** [August 23, 2019, 5:59pm UTC](https://discuss.elastic.co/t/timelion-visualisation-sort-and-limit-rabbitmq-queue-entries/196490/2 "2019-08-23T17:59:53Z")

</div>

Hi, I believe this is an outstanding feature request of Timelion: [https://github.com/elastic/kibana/issues/12544](https://github.com/elastic/kibana/issues/12544)

There is a suggestion in that thread that may be useful. You may also want to consider building this visualization in a different kind of visualization instead, which have sorting functionality (Line graph, or TSVB).

---

<div class="post-metadata">

**Author:** ![wouter.vandenheede](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wouter.vandenheede/32/47736_2.png) [@wouter.vandenheede](https://discuss.elastic.co/u/wouter.vandenheede)\
**Post date:** [August 30, 2019, 2:24pm UTC](https://discuss.elastic.co/t/timelion-visualisation-sort-and-limit-rabbitmq-queue-entries/196490/3 "2019-08-30T14:24:22Z")

</div>

Hi,

Sorry for the late reply. I just tried with TSVB and it looks much better 🙂

Thanks,  
Wouter

---

<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 27, 2019, 2:24pm UTC](https://discuss.elastic.co/t/timelion-visualisation-sort-and-limit-rabbitmq-queue-entries/196490/4 "2019-09-27T14:24:42Z")

</div>

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