Hadithcore
Hadith #2118860

At-Tirmidhi reported a similar tradition on the authority of `Abu Hurairah (RAA), he said at its end, “And increase my knowledge. Praise be to Allah in all circumstances. I seek refuge in Allah from the state of those who will go to Hell.” Its chain of narrators is good.

وَلِلتِّرْمِذِيِّ: مِنْ حَدِيثِ أَبِي هُرَيْرَةَ نَحْوُهُ, وَقَالَ فِي آخِرِهِ: { وَزِدْنِي عِلْمًا, وَالْحَمْدُ لِلَّهِ عَلَى كُلِّ حَالٍ, وَأَعُوذُ بِاَللَّهِ مِنْ حَالِ أَهْلِ اَلنَّارِ } وَإِسْنَادُهُ حَسَنٌ .‏ [1]‏ .‏

References2 variants
Sunnah.com reference
Book 16, Hadith 131
Arabic/English book reference
Book 16, Hadith 1609