Use sql request to find replica that should be checked.
Factorise to string of exception with margin.