Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) narrates: The Prophet (peace and blessings be upon him) used to supplicate with these words:
'Allahumma - ahsabuhu qala: as'aluka imanan yubashiru qalbi hatta a'lama an la yusibani illa ma katabta li, wa ridan min al-ma'ishah bima qasamta li'
(O Allah! (The narrator is unsure about one word here.) I ask You for faith that permeates my heart, so that I come to know that nothing will befall me except what You have written for me; and make me content with the share of livelihood You have allotted me.)
Al-Bazzar recorded it; its chain contains a narrator, Abu Mahdi Sa'id bin Sinan, who is da'if (weak) in hadith.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الأدعية / 17410