Sunan an-Nasa'i, Book 16, Hadith 45 (In-Book) ⓘ
It was narrated that Abu Musa said: "There was an eclipse of the sun, and the Messenger of Allah got up in a rush, fearing that it might be the Hour. He went to the masjid, where he stood and prayed, standing, bowing and prostrating for the longest time that I ever saw him do in prayer. Then he said: 'These signs that Allah (SWT) sends do not occur for the death or birth of anyone, but Allah (SWT) sends them to strike fear into His slaves. If you see any of these things, then hasten to remember Him, call upon Him supplicate and ask for His forgiveness.'"
أَخْبَرَنَا مُوسَى بْنُ عَبْدِ الرَّحْمَنِ الْمَسْرُوقِيُّ، عَنْ أَبِي أُسَامَةَ، عَنْ بُرَيْدٍ، عَنْ أَبِي بُرْدَةَ، عَنْ أَبِي مُوسَى، قَالَ خَسَفَتِ الشَّمْسُ فَقَامَ النَّبِيُّ صلى الله عليه وسلم فَزِعًا يَخْشَى أَنْ تَكُونَ السَّاعَةُ فَقَامَ حَتَّى أَتَى الْمَسْجِدَ فَقَامَ يُصَلِّي بِأَطْوَلِ قِيَامٍ وَرُكُوعٍ وَسُجُودٍ مَا رَأَيْتُهُ يَفْعَلُهُ فِي صَلاَتِهِ قَطُّ ثُمَّ قَالَ " إِنَّ هَذِهِ الآيَاتِ الَّتِي يُرْسِلُ اللَّهُ لاَ تَكُونُ لِمَوْتِ أَحَدٍ وَلاَ لِحَيَاتِهِ وَلَكِنَّ اللَّهَ يُرْسِلُهَا يُخَوِّفُ بِهَا عِبَادَهُ فَإِذَا رَأَيْتُمْ مِنْهَا شَيْئًا فَافْزَعُوا إِلَى ذِكْرِهِ وَدُعَائِهِ وَاسْتِغْفَارِهِ " .
also referenced under: Hadith 1503 (Reference) & Volume 2, Book 16, Hadith 1504 (DarusSalam)