16 Jul 2025 11:00 PM
Currently we have a DQL query running in workflow for checking the max value of one of the rabbitmq queues from 22:00 to 23:59 and send us alert if the max value is lower than the threshold. The workflow running in the midnight.
timeseries ready = max(rabbitmq.queue.messages_ready),
by:{queue}, from:now()-2h, to:now()
| fields readyMax = round(arrayMax(ready), decimals: 0), queue
| filter queue == "Dialler.DecisionTrigger2"
Now we would like to have some analysis for the rabbitmq result. We would like to make a summary for the max value of rabbitmq messages from 22:00 to 23:59 for last 3 months by each day as a table format as below:
|Date | max value|
|2025-7-1| 115k|
|2025-7-2| 35k|
|2025-7-3| 60k|
|2025-7-4| 95k|
|2025-7-5| 55k|
...
However, we are not familiar to expand the above DQL query including the time filtering and summary part. any help will be appreciated.
18 Jul 2025 06:32 PM
I have slightly modified the dql query for extracting that data that I need, and then extract to csv, add the filtering for the report that I want. Not sure if there is better way to do so.
timeseries value = max(rabbitmq.queue.messages), interval: 1h,
by:{queue}
// *** timeseries interval splitter start ***
| fields queue, timeslot=record(
timeframe.start = timeframe[start] + interval * iIndex(),
value[]
/* add any dimension split (by:) field names here */
)
| filter queue == "Dialler.DecisionTrigger2"
//| filter getHour(timeframe[start]) >= 19
| expand timeslot
| fieldsFlatten timeslot
| fieldsRemove timeslot