Sahih al-Bukhari, Volume 2, Book 18, Hadith 165 (USC-MSA)

Narrated Abu Mas`ud: Allah's Messenger said, "The sun and the moon do not eclipse because of someone's death or life but they are two signs amongst the signs of Allah, so pray whenever you see them."

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

sunnah.com