Once upon a time, Sage Agastya sought the blessings of Lord Brahma and Shiva. The sage wished to create flowing river in a suitable location to offer water to the southern lands. The Gods, listening to his prayers, had his kamandalu filled with sacred water.
The Sage then reached the Coorg Mountains. On his way, he spotted a small boy and requested him to take good care of his pot containing water as he needed to go to toilet. The small boy was none other than Ganesha and he placed the small pot on the ground as he felt that location was perfect for a river. Then a crow landed on this pot and Sage Agastya shooed off the bird. The crow flew off tipping the pot to the ground and spilled off some water. This water formed River Kaveri and is considered as a sacred river.
Every action happens for a good cause. So do not be worried even if something seems to be bad happening in your life, eventually there will be a good ending. God does everything for a reason, one that would yield great benefits for everyone permanently.