When you think about bodily fluids, you may not immediately think of them coming out your eyeballs. But the state of all the stuff creeping out of your eyes can be a marker for several things—a few of which require medical attention. That's not to say that eye discharge is always unusual. The eye makes mucus (or rheum) throughout the day and night to help flush out waste, and it can collect while you're sleeping. (Here are 10 things your eyes say about you.)

"Having a little bit in the inner corner of your eyes when you wake up is normal," says Matthew Gardiner, MD, director of the emergency room and of ophthalmology emergency services at the Massachusetts Eye and Ear Infirmary. "But if during the day it's reaccumulating or it's welling up, then something is wrong." (Want to pick up some healthier habits? Sign up to get FREE healthy living tips and more delivered straight to your inbox!)

Here's what you can learn from the gook under your lids.

You have an eye infection.

Various infections, such as blepharitis (an inflammation of the eyelid), can cause an irritation of the eye that results in discharge or crustiness. For instance, your lashes might be matted and you may have trouble opening your eyes in the morning because of it. (Some morning crustiness can be normal, but if your eyes feel glued shut, that’s a sign that something may be off.) Generally, this calls for warm compresses and good eyelid hygiene, such as washing the eyelid with a commercial lid scrub or baby shampoo diluted with water. No meds necessary. (Here are 6 eye issues you might encounter after 40.)

You have a cold.

Viral infections in the eye, such as conjunctivitis, can accompany the common cold and cause watery discharge and red, irritated eyes. "A cold affects all the mucous membranes in your head," Gardiner says. Your eyes should get better when the rest of your cold clears up, but if you're seeing green discharge, tell your primary care doctor: It might signal a sinus infection.

You’re allergic to something.

Conjunctivitis also comes in bacterial and allergic varieties, the latter of which leads to red, itchy eyes and stringy discharge. "As you go to wipe it away, a long string extends off your finger," Gardiner says. Over-the-counter antihistamine eyedrops can help. If you think you're allergic to something in the air, try closing your windows when the pollen count is high and using an indoor air purifier.

You have a plugged gland.

Your eyes produce tears all day long, but excess moisture usually drains via openings in the upper and lower eyelids called puncta. If those openings get clogged—or if there's a clog farther down the pipeline after the opening—it can result in excessive tearing. This may go away on its own or may require medical intervention. Children often have this problem but usually grow out of it.

Your eyes are dry.

Ironically, excessive tearing can sometimes be blamed on dry eyes.  In this case, your lacrimal gland, which produces tears all day long to lubricate your eye, may be under-producing. When the signal reaches the gland that your eyes are dry and need more moisture, it goes into overdrive. "You'll have this episodic gush of tears," Gardiner says. "And then you're fine, and then it dries again, and then more tears." A baseline tear deficiency can be solved by using artificial tears. (Here are 7 ways to prevent dry eyes.)

Your contact lenses are old or dirty.

The lenses themselves may contain viruses or bacteria that are getting into your eye, or they may just be dirty from everyday use, which can cause your eye to produce discharge. (Here's why you should never shower ever with your contact lenses in.) If you haven’t cleaned or upgraded your lenses in a while and you're having issues, consider it time for a new pair.

You should see a doctor.

If your eyes are a little crusty for a few days or you're seeing some redness, that's no big deal, especially if you have a cold. But if you're seeing intense redness in one or both eyes along with moderate pain and sensitivity to light, you may need antibiotics for pink eye —aka bacterial conjunctivitis. And if you're having profuse discharge, your eye hurts, or you're experiencing a change of vision, you need to visit a professional. Says Gardiner: "Horrible pain and changes in vision are not normal."

This article originally appeared on Prevention.com.