This module measures the number of outgoing s2s connections which are not fully established yet, and the number of stanzas queued for delivery until they are established.
With the plugin installer in Prosody 0.12 you can use:
sudo prosodyctl install --server=https://modules.prosody.im/rocks/ mod_measure_pending_s2s
For earlier versions see the documentation for installing 3rd party modules