You didn't tell us much about your dog that could help us lead you in the right direction
1. age
2. breed
3. gender (neutered or not...)
4. vaccination status
5. any changes in environment....pesticides, temperature, new plants, etc etc etc. EVEN stress (favorite family member gone for example, new baby...)
6. Diet changes. either dog food, people food, or something non-edible.
7. how long he hasn't been eating. Is he drinking?
8. has he gone anywhere besides his home lately? Have any other animals visited his house.
9. Any diarrhea or vomiting? Coughing or sneezing? Feel his ears, see if they feel hot. Is he urinating normally? Are bowel movements normal?
Anything else you could add would help.