Regarding this error
"No Post Office Specified Exception"
Can we somehow trigger this frequent attach/detach of agents with any metrics in APM?
APM 10.7, 10.8
Currently there is no way to simulate a attach/detach of an agent with respect to a specific metric or any metrics. The only way to do this is to stop and start the Agent.
However, if you want to block the Agent from connecting, on the MOM you would use load balancing. The file is located in <MOM home>/config/loadbalancing.xml. Here you can elect to force a specific Agent (or more than 1) to go to a specific Collector or not be allowed to connect to the cluster at all.
See links below. Also the loadbalancing.xml file has examples inside of it as well.
Configure loadbalancing.xml for Allowed and Disallowed Agents by Enterprise Manager
Loadbalance.xml: Catch-all phase is usually recommended to be placed at the bottom of the list.
Also for logging, there is no other method than setting log4j.logger.Manager to DEBUG for any agent connection/disconnection.
On the Agent side, same thing. Only setting log4j.logger.IntroscopeAgent to DEBUG for any agent connection/disconnection.