Ammar bin Yasir reported,

I heard the Messenger of Allah ﷺ say in his prayer, "O Allah, by Your knowledge of the unseen and Your power over creation, keep me alive so long as You know that life is best for me, and take me when You know that death is best for me. O Allah, I ask You for awe of You in private and in public. I ask You for the word of truth in times of contentment and anger. I ask You for moderation in poverty and in wealth. I ask You for a blessing that never ends, and for a delight of the eye that never ceases. I ask You for contentment after Your decree, and for the coolness of life after death. I ask You for the pleasure of gazing upon Your Face, and the longing to meet You, without any harmful affliction or misleading trial. O Allah, adorn us with the beauty of faith, and make us guides who are themselves rightly guided."

Azami 2189

Sahih

عن عمار بن ياسر قال

سمعت رسول الله ﷺ يقول في صلاته: اللهم بعلمك الغيب، وقدرتك على الخلق أحيني ما علمت الحياة خيرا لي، وتوفني إذا علمت الوفاة خيرا لي، اللهم أسألك خشيتك- يعني في الغيب والشهادة، وأسألك كلمة الحق في الرضا والغضب، وأسألك القصد في الفقر والغنى، وأسألك نعيما لا ينفد، وأسألك قرة عين لا تنقطع، وأسألك الرضا بعد القضاء، وأسألك برد العيش بعد الموت، وأسألك لذة النظر إلى وجهك، والشوق إلى لقائك في غير ضراء مضرة، ولا فتنة مضلة، اللهم زينا بزينة الإيمان، واجعلنا هداة مهتدين.

الأعظمي 2189صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Tashahhud and salam
Section
Supplications before the taslim
Numbering
Jami al-Kamil 2189 (2nd edition)
Azami 2189