Language:
كتاب بدء الخلق
59  
Beginning of Creation
(15)
Chapter: The best property of a Muslim will be sheep
(15)
باب خَيْرُ مَالِ الْمُسْلِمِ غَنَمٌ يَتْبَعُ بِهَا شَعَفَ الْجِبَالِ
Sahih al-Bukhari 3303

Narrated Abu Huraira:

The Prophet (ﷺ) said, "When you hear the crowing of roosters, ask for Allah's Blessings for (their crowing indicates that) they have seen an angel. And when you hear the braying of donkeys, seek Refuge with Allah from Satan for (their braying indicates) that they have seen a Satan."

حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا اللَّيْثُ، عَنْ جَعْفَرِ بْنِ رَبِيعَةَ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏ "‏ إِذَا سَمِعْتُمْ صِيَاحَ الدِّيَكَةِ فَاسْأَلُوا اللَّهَ مِنْ فَضْلِهِ، فَإِنَّهَا رَأَتْ مَلَكًا، وَإِذَا سَمِعْتُمْ نَهِيقَ الْحِمَارِ فَتَعَوَّذُوا بِاللَّهِ مِنَ الشَّيْطَانِ، فَإِنَّهُ رَأَى شَيْطَانًا ‏"‏‏.‏
Reference : Sahih al-Bukhari 3303
In-book reference : Book 59, Hadith 111
USC-MSA web (English) reference : Vol. 4, Book 54, Hadith 522
  (deprecated numbering scheme)