The sun was eclipsed, so the Prophet ﷺ rose in alarm, fearing it might be the Hour. He went to the mosque and stood in prayer, performing the longest standing, bowing, and prostration I had ever seen him do in any prayer. Then he said, "These signs which Allah sends do not occur for the death or birth of anyone. Rather, Allah sends them to instill fear in His servants. So whenever you witness any of them, hasten to His remembrance, supplication, and seeking His forgiveness."
أخبرنا موسى بن عبد الرحمن المسروقي عن أبي أسامة عن بريد عن أبي بردة
خسفت الشمس فقام النبي ﷺ فزعا يخشى أن تكون الساعة فقام حتى أتى المسجد فقام يصلي بأطول قيام وركوع وسجود ما رأيته يفعله في صلاته قط ثم قال إن هذه الآيات التي يرسل الله لا تكون لموت أحد ولا لحياته ولكن الله يرسلها يخوف بها عباده فإذا رأيتم منها شيئا فافزعوا إلى ذكره ودعائه واستغفاره
Bukhari transmitted it in the Book of the Eclipse, Chapter on Remembrance During the Eclipse, no. 1059, and Muslim in the Book of the Eclipse, Chapter on the Call for the Eclipse Prayer with the Announcement "The prayer is being held in congregation," no. 912, from the hadith of Abu Usama Hammad bin Usama, with the same chain. It is also found in Al-Kubra, no. 1890.