Meet Jedi, a diabetes-sniffing labrador who watches over 7-year-old Luke, a Type 1 diabetic who struggles with potentially life-threatening changes in his blood sugar as he sleeps.

Last week, Luke and his parents were fast asleep. The monitor that tracks Luke's blood sugar levels said everything was fine.

But it wasn't.

Jedi knew something was wrong -- he could smell that his best friend's blood sugar had dropped dangerously low. And though his owners ignored him at first, Jedi wouldn't let them sleep until the issue was resolved:

This may just look like a dog, a sleeping boy and a number on a screen, but this, this moment right here is so much... Posted by Saving Luke - Luke and Jedi - Fighting Type 1 Diabetes Together on Thursday, March 3, 2016

"Jedi jumped off the bed, then back on again, though I felt him do this I didn't wake up," Luke's mom Dorrie wrote in a Facebook post that has since gone viral. "Then Jedi laid on me ... I suddenly was fully awake and I knew there was an issue."

She was able to get Luke the glucose he needed. He slept safely through the night, something that might not have happened if it weren't for his furry best friend.

Jedi is one of hundreds of diabetes service dogs in the U.S. There are all sorts of programs that train dogs to smell dangerous blood sugar changes and pair them with owners: Dogs 4 Diabetics, a nonprofit which trains dogs in California, has matched over 150 dogs since its launch in 2004. Other programs, like Diabetic Alert Dogs of America, have matched hundreds more, spokespeople for both programs told HuffPost.

Alert dogs -- common breeds include labs and golden retrievers -- detect scents that humans emit during blood sugar changes using their highly keen sense of smell. Other animals that can sniff disease include rats, who are routinely used in Africa to identify tuberculosis. Used correctly, the critters are cheaper and just as accurate as -- or even more accurate than -- a machine.

Research is also being done on dogs' ability to detect cancer in patients who otherwise show no signs of the disease. The United Kingdom has one of the leading research programs on this front, and some U.S. dogs are being trained to do the same. Experts don't know when, if ever, the dogs will work in American hospitals, but they hope to use their sniffing skills to develop better cancer detection technology, Dr. Cindy Otto told The New York Times.

Luke's mom, Dottie, told HuffPost she initially shared the photo to alert others to the reality of Type 1 diabetes: Children often go undiagnosed, so it's important to pay attention to symptoms which can include fatigue, weight loss and slow-healing cuts and bruises.