صحيح البخاري Sahih Bukhari كتاب الأدب The Book of Al-Adab (Good Manners)
بَابُ مَا يُكْرَهُ أَنْ يَكُونَ الْغَالِبُ عَلَى الإِنْسَانِ الشِّعْرُ حَتَّى يَصُدَّهُ عَنْ ذِكْرِ اللَّهِ وَالْعِلْمِ وَالْقُرْآنِ:

(92) Chapter. It is disliked for one to indulge in poetry to the extent that it diverts him from Allah’s remembrance, and from (religious) knowledge and from (recitation of) the Quran.

2 hadith
Hadith 6154
حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُوسَى ، أَخْبَرَنَا حَنْظَلَةُ ، عَنْ سَالِمٍ ، عَنِ ابْنِ عُمَرَ رَضِيَ اللَّهُ عَنْهُمَا ، عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ : " لَأَنْ يَمْتَلِئَ جَوْفُ أَحَدِكُمْ قَيْحًا خَيْرٌ لَهُ مِنْ أَنْ يَمْتَلِئَ شِعْرًا " .
Narrated Ibn `Umar: The Prophet said, "It is better for a man to fill the inside of his body with pus than to fill it with poetry."
Hadith Reference Sahih Bukhari / The Book of Al-Adab (Good Manners) / Hadith: 6154
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Hadith 6155
حَدَّثَنَا عُمَرُ بْنُ حَفْصٍ ، حَدَّثَنَا أَبِي ، حَدَّثَنَا الْأَعْمَشُ ، قَالَ : سَمِعْتُ أَبَا صَالِحٍ ، عَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ ، قَالَ : قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ : " لَأَنْ يَمْتَلِئَ جَوْفُ رَجُلٍ قَيْحًا يَرِيهِ خَيْرٌ مِنْ أَنْ يَمْتَلِئَ شِعْرًا " .
Narrated Abu Huraira: Allah's Apostle; said, "It is better for anyone of you that the inside of his body be filled with pus which may consume his body, than it be filled with poetry."
Hadith Reference Sahih Bukhari / The Book of Al-Adab (Good Manners) / Hadith: 6155
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة