The Messenger of Allah ﷺ said, "Indeed, some poetry contains wisdom."
حدثنا أبو بكر حدثنا عبد الله بن المبارك عن يونس عن الزهري حدثنا أبو بكر بن عبد الرحمن بن الحارث عن مروان بن الحكم عن عبد الرحمن بن الأسود بن عبد يغوث
أن رسول الله ﷺ قال إن من الشعر لحكمة
No references are available.
Bukhari narrated it in the Book of Manners, chapter on what poetry, rajaz verse, and camel-driving songs are permissible and what is disliked of it, Hadith 6145, from the hadith of Zuhri through this same chain.