It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that before the 'Sweeping Plague' (al-Ta'un al-Jarif, the deadly epidemic that swept everyone away), whenever he passed by a newly built mosque he would ask about it, and he would be told that such-and-such a tribe had built this mosque. Then he (may Allah be pleased with him) would say: "It used to be said that a time will come upon the people when they will build mosques and boast about them, but they will fill them (with remembrance and worship) only a little." Ayyub (may Allah have mercy on him) states: "Then that Sweeping Plague came and swept them (those who boasted) away."
This chain is da'if (weak) because the Successor (Tabi'i) in it is unknown (majhul).
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب المساجد / 941
Hadith Gradingمحدثین:إسناده ضعيف موقوفًا على أنس؛ لجهالة التابعي