Unless I am mistaken custom integrations, such as the ninjarmm integration, cannot refresh the online status of an agent without reloading all agents with the integration.
If integrations could provide a way to manually refresh a single agent this would be ideal. NinjaRMM for example could get this from the device details API endpoint (/v2/device/{id})