Sunan an-Nasa'i, Volume 2, Book 16, Hadith 1463 (DarusSalam)

It was narrated that Abu Mas'ud said: "The Messenger of Allah said: "The sun and the moon do not become eclipsed for the death or birth of anyone, rather they are two of the signs of Allah (SWT), the Mighty and Sublime, so when you see that then pray.'"

أَخْبَرَنَا يَعْقُوبُ بْنُ إِبْرَاهِيمَ، قَالَ حَدَّثَنَا يَحْيَى، عَنْ إِسْمَاعِيلَ، قَالَ حَدَّثَنِي قَيْسٌ، عَنْ أَبِي مَسْعُودٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏‏ "‏‏ إِنَّ الشَّمْسَ وَالْقَمَرَ لاَ يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ وَلَكِنَّهُمَا آيَتَانِ مِنْ آيَاتِ اللَّهِ عَزَّ وَجَلَّ فَإِذَا رَأَيْتُمُوهُمَا فَصَلُّوا ‏‏" ‏‏ ‏‏.‏‏

sunnah.com