I think the stomach flu may be a coincidence, but if vomiting and inactivity follow then onyx could have a health issue that needs further analysis. From what I know as far it could be intestinal parasites. My dog, Iki never had green stools, but it was diarrhea nonetheless because of worms. But if your dog was passing normal stools before then he could just have consumed something undesirable like feces (I know my dog does). Other than that, if the problem persists then it would be best to see a vet.