Sunan an-Nasa'i, Book 13, Hadith 127 (In-Book)

Ata bn As-Sa'ib narrated that his father said: "Ammar bin Yasir led us in prayer and he made it brief. Some of the people said to him: 'You made the prayer sort (or brief).' He said: 'Nevertheless I still recited supplications that I heard from the Messenger of Allah.' When he got up and left, a man- he was my father but he did not name himself- followed him and asked him about that supplication, then he came and told the people. "Allahumma bi 'ilmikal-ghaiba wa qudratika 'alal-khalqi ahyini ma 'alimtal-hayata khairan li, wa tawaffani idha 'alimtal-wafata khairan li. Allahumma as'aluka khashyataka fil-ghaibi wash-shahadati wa as'aluka kalimatul-aqua fir-rida'i wal ghadab, wa as'alukal-qasda fil faqr wal-ghina, wa as'aluka na'iman la yanfadu wa as'aluka qurrata ainan la tanqati'u wa as'alukar-rida'i ba'dal-qada'i wa as'aluka bardal 'aishi ba'dal-mawti, wa as'aluka ladhatan-nazari ila wajhika wash-shawqa ila liqa'ika fi fitnatin mudillatin, Allahumma zayyina dizinatil-imani waj'alna hudatan muhtadin (O Allah, by Your knowledge of the unseen and Your power over creation, keep me alive so long as You know that living is good for me and cause me to die when You know that death is better for me. O Allah, cause me to fear You in secret and in public. I ask You to make me true in speech in times of pleasure and of anger. I ask You to make me moderate in times of wealth and poverty. And I ask You for everlasting delight and joy that will never cease. I ask You to make me pleased with that which You have decreed and for an easy life after death. I askYou for the sweetness of looking upon Your face and a longing to meet You in a manner that does not entail a calamity that will bring about harm or a trial that will cause deviation. O Allah, beautify us with the adornment of faith and make us among those who guide and are rightly guided."

أَخْبَرَنَا يَحْيَى بْنُ حَبِيبِ بْنِ عَرَبِيٍّ، قَالَ حَدَّثَنَا حَمَّادٌ، قَالَ حَدَّثَنَا عَطَاءُ بْنُ السَّائِبِ، عَنْ أَبِيهِ، قَالَ صَلَّى بِنَا عَمَّارُ بْنُ يَاسِرٍ صَلاَةً فَأَوْجَزَ فِيهَا فَقَالَ لَهُ بَعْضُ الْقَوْمِ لَقَدْ خَفَّفْتَ أَوْ أَوْجَزْتَ الصَّلاَةَ ‏.‏ فَقَالَ أَمَّا عَلَى ذَلِكَ فَقَدْ دَعَوْتُ فِيهَا بِدَعَوَاتٍ سَمِعْتُهُنَّ مِنْ رَسُولِ اللَّهِ صلى الله عليه وسلم فَلَمَّا قَامَ تَبِعَهُ رَجُلٌ مِنَ الْقَوْمِ هُوَ أَبِي غَيْرَ أَنَّهُ كَنَى عَنْ نَفْسِهِ فَسَأَلَهُ عَنِ الدُّعَاءِ ثُمَّ جَاءَ فَأَخْبَرَ بِهِ الْقَوْمَ ‏ "‏ اللَّهُمَّ بِعِلْمِكَ الْغَيْبَ وَقُدْرَتِكَ عَلَى الْخَلْقِ أَحْيِنِي مَا عَلِمْتَ الْحَيَاةَ خَيْرًا لِي وَتَوَفَّنِي إِذَا عَلِمْتَ الْوَفَاةَ خَيْرًا لِي اللَّهُمَّ وَأَسْأَلُكَ خَشْيَتَكَ فِي الْغَيْبِ وَالشَّهَادَةِ وَأَسْأَلُكَ كَلِمَةَ الْحَقِّ فِي الرِّضَا وَالْغَضَبِ وَأَسْأَلُكَ الْقَصْدَ فِي الْفَقْرِ وَالْغِنَى وَأَسْأَلُكَ نَعِيمًا لاَ يَنْفَدُ وَأَسْأَلُكَ قُرَّةَ عَيْنٍ لاَ تَنْقَطِعُ وَأَسْأَلُكَ الرِّضَاءَ بَعْدَ الْقَضَاءِ وَأَسْأَلُكَ بَرْدَ الْعَيْشِ بَعْدَ الْمَوْتِ وَأَسْأَلُكَ لَذَّةَ النَّظَرِ إِلَى وَجْهِكَ وَالشَّوْقَ إِلَى لِقَائِكَ فِي غَيْرِ ضَرَّاءَ مُضِرَّةٍ وَلاَ فِتْنَةٍ مُضِلَّةٍ اللَّهُمَّ زَيِّنَّا بِزِينَةِ الإِيمَانِ وَاجْعَلْنَا هُدَاةً مُهْتَدِينَ ‏" ‏ ‏.‏

sunnah.com