Complaining seems inextricably linked with self righteousness. If I put myself up as a god, then that gives me the right to criticize or complain, as I would always know what is best.
I just read in Acts that Paul said we are not to criticize our leaders. Further, we are also given very specific instructions on how to deal with something that someone has done to us. This process never involves murmuring or complaining. It does not allow venting. Nor whining.
We are to go directly to the person who has wronged us or about whom we have a complaint. Then we are to lovingly bring it to their attention, keeping right motives in our heart. If they do not listen then we are to go back with one or two witnesses. And, of course, we are to pray.
If we choose not to confront them, then we need to learn to forgive and live with whatever the situation is without rancor or bitterness.
This is not to say that all will turn out to our liking. It may actually be that the biggest adjustment is needed in our own hearts.