check-rabbitmq-queue: Log queue size in "queue stuck" alert.

This commit is contained in:
Mateusz Mandera 2020-05-14 15:26:12 +02:00 committed by Tim Abbott
parent 5ee80c70e2
commit 28a6983b34
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@ def analyze_queue_stats(queue_name: str, stats: Dict[str, Any],
# 50). # 50).
return dict(status=CRITICAL, return dict(status=CRITICAL,
name=queue_name, name=queue_name,
message='queue appears to be stuck, last update %s' % (stats['update_time'],)) message='queue appears to be stuck, last update %s, queue size %s' % (
stats['update_time'], queue_count_rabbitmqctl))
current_size = stats['current_queue_size'] current_size = stats['current_queue_size']
average_consume_time = stats['recent_average_consume_time'] average_consume_time = stats['recent_average_consume_time']