Heat 1tbsp oil in a saute pan; add urad dal and fry until lightly browned. Next add mustard seeds and once the seeds start to splutter, add fenugreek seeds and dry red chilies. Lower the heat when the chilies start to change color.
Add the remaning tempering ingredients and cook for a minute.
Next add the chopped onions and ginger; fry until onions don't smell raw anymore, about 4-5 minutes.
Cool the mixture slightly. Then grind into a coarse paste along with tamarind paste and salt. Serve with dosa, idli or steamed rice.