Hi,
you can create external parameter in agent and use curl to get this number, like this:
nxagentd.conf:
ExternalParameter = QueueSize:curl https://example.org/status/queueSize
and then your agent will have parameter QueueSize which you will be able to monitor as usual.
Best regards,
Victor