Jami` at-Tirmidhi, Book 43, Hadith 3081 (In-Book) ⓘ
Narrated Ibn 'Abbas: that the Messenger of Allah said: "Indeed there is wisdom in (some) poetry."
حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا أَبُو عَوَانَةَ، عَنْ سِمَاكِ بْنِ حَرْبٍ، عَنْ عِكْرِمَةَ، عَنِ ابْنِ عَبَّاسٍ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " إِنَّ مِنَ الشِّعْرِ حُكْمًا " . قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ .
also referenced under: Hadith 2845 (Reference) & Volume 5, Book 41, Hadith 2845 (DarusSalam)