Sunan Ibn Majah, Book 33, Hadith 99 (Ibn Majah 3757)

It was narrated from Ubbay bin Ka'b that the Messenger of Allah(ﷺ) said:

"In some poetry there is wisdom."