From The Complainer (#379) by Rabbi Avigdor Miller
Everyone exhibits the middah of nirganus (complaining, finding faults) from time to time. Nirganus is a sin; it’s one of the types of misaprei lashon hara (those who speak forbidden speech). It’s caused by impatience; by not wanting to look into things more thoroughly; by making snap judgments. It’s also caused by ingratitude, sinas chinam (baseless hatred), and arrogance.
First one has to first learn how to deal with Hashem — to be on good terms with Him and not complain against anything He sends. He can then learn not to complain against people. On the contrary — as much as possible he must interpret their intentions in the best way. Even if you think someone intended malice, and it wasn’t as bad as you thought — maybe they just spoke a careless word toward you — perhaps they intended only good.
If you want to greet the Shechinah (Divine Presence), you have to fight against complaining
Nirganus must be avoided — between a husband and wife; children toward parents; students toward rebbes; between workers and employers. If a person wants to be eligible to greet the face of the Shechinah, he has to fight against this quality of nirganus.
The Orchos Tzaddikim says that to combat nirganus, we need to work on the middah of razton. Ratzon is the opposite of nirganus; it means being satisfied and finding the good points in all circumstances. If you can’t understand where the good is in a specific situation, give the benefit of the doubt and say the situation is probably good, the people are probably good, or they probably have good intentions toward you.
Being satisfied and seeing good in everything will correct lot of middos in a person. Suddenly you like the heat of the summer or the cold of winter; you like your wife’s cooking; you like your wife’s relatives; you like your brothers and sisters; you like frum Jews everywhere; you like the yeshivah, the synagogue, the rabbanim — you like all the things that Hakadosh Baruch Hu wants you to like and that He gives. Seeing the good — that’s the way to truly succeed in correcting many of our character traits.