ZBXNEXT-2442 alert manager was added to manager multiple alerter processes. The alert manager caches all unsent alerts and the alert queue size is a good indicator of alert subsystem performance (are there enough alerter processes for example).
It would be nice to have internal item for alert queue monitoring. Alert manager would keep counter for cached alerts (it's easier to keep a counter rather than iterate trough the nested queues to calculate total queue size). Pollers would get the queue size from alert manager through socket based IPC.