I am trying to create an alert which checks if there is a problematic worker which doesn’t take tasks from rabbitmq queue.
They way for us to indicate it is: If tasks_ready > X AND queue idle_since > now() - 10m.
The problem is that Telegraf’s rabbitmq plugin returns idle_since as string instead of time, and I just can query over it.
tried so many functions and still it doesn’t work.
the query must also work with Kapacitor.
select last(idle_since) from rabbitmq_queue where last > now() - 1h group by queue limit 1 - 0 value returned
select last(idle_since) from rabbitmq_queue where last < now() - 1h group by queue limit 1 - 0 value returned
select last(idle_since) from rabbitmq_queue group by queue limit 1:
1535011291000000000 2018-08-23 7:15:58
1535023021000000000 2018-08-23 11:16:01
1535023021000000000 2018-08-23 10:59:59
How can I query that when it’s not a date?