While we were traveling with the Messenger of Allah ﷺ at al-Arj, a poet appeared reciting poetry. The Messenger of Allah ﷺ said, "Seize the devil," or "Hold back the devil. For a man's belly to be filled with pus is better for him than to be filled with poetry."
حدثنا قتيبة بن سعيد حدثنا ليث عن ابن الهاد عن يحنس مولى مصعب بن الزبير
بينما نحن نسير مع رسول الله ﷺ بالعرج إذ عرض شاعر ينشد فقال رسول الله ﷺ خذوا الشيطان أو أمسكوا الشيطان لأن يمتلئ جوف رجل قيحا خير له من أن يمتلئ شعرا
Its isnad is sahih. Layth is Ibn Saad, as in the following entry, and he is trustworthy and a leading authority. Yuhanis is Ibn Abdullah, trustworthy. The hadith is found in Muslim, 4/1769, number 2259, in the chapter on poetry, and in Bayhaqi, 10/244. The scholars have interpreted this hadith as applying to the case where a person is predominantly known for poetry, satire, and earning a living through it.