If a regsitered MBean gets unregistered from MBean server, the HQ Agent tries to collect metric from container using JMX query since MBean, and since it is unregistered it gets an exception related to JMX object not found. This exception can be seen in agent log however, on HQ Server side the resource availability for that particular JMX resource remains as Available.
We need to not only log the error, but return a valid metric value (i.e. DOWN, UNKNOWN, or maybe WARN) when this happens. Leaving the metric in the last known state is incorrect.