Abu Majliz reported,

Ammar led us in a prayer and made it brief. The people objected to this, so he said, "Did I not complete the bowing and prostration?"They replied, "Yes, you did."He said, "During the bowing and prostration, I supplicated with a prayer that the Messenger of Allah ﷺ used to make. O Allah, by Your knowledge of the unseen and Your power over creation, keep me alive as long as You know that life is better for me, and take me when You know that death is better for me. I ask You for awe of You in private and in public, and for the word of truth in anger and in contentment, and for moderation in poverty and in wealth, and for the delight of gazing upon Your face, and the longing to meet You. I seek refuge in You from harm that injures, and from trials that lead astray. O Allah, adorn us with the beauty of faith, and make us guides who are rightly guided."

Ahmad 18325

Sahih

حدثنا إسحاق الأزرق عن شريك عن أبي هاشم

عن أبي مجلز قال

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

أحمد 18325صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Ammar bin Yasir
Numbering
Darussalam 18325
Ahmad 18325