The most common causes would be diabetes, kidney disease, or cushings disease.
She will need blood work to determine the cause because it could be any one of the three with the symptoms you are describing.
Diabetes in dogs in dogs causes elevated blood sugar just like in people. The blood sugar can be controlled with diet and insulin injections.
Kidney disease can be controlled with diet in the early stages. In the later stages, she would need to be put on medications, to help ease the kidneys workload, and be given fluids, under the skin, to help flush out the toxins the kidneys are no longer filtering.
Cushings disease is where the adrenal glands, located on top of the kidneys, are producing too much cortisol (stress hormone). It can be caused by a pituitary gland tumor (benign) telling the adrenal glands to make more cortisol. Or, the adrenal glands can have a tumor which directly makes more cortisol. The tumor on the adrenal glands is not as common but it can be malignant. A medication can be given to reduce the cells, on the adrenal glands, that make the cortisol.
If she has been in heat in the past few months, and has drainage from her vulva, then I would go with uterine infection which is also called "pyometra." Treatment is surgical removal of the infected uterus and antibiotics. She could have what is called a "closed cervix pyometra," where the cervix is closed and there is no vulvar drainage, but I do not think she would have made it two months and the infected uterus would have ruptured after a couple weeks.
It sounds like she is doing poorly and the sooner you get her diagnosed and treated, the better her prognosis.
I hope this helps.