An interesting thought experiment. There are some details missing in the writeup above, however. In the simplest scenario, all the monks must be present at the guru's announcement, all monks must know before or at the end of the day if any other monks are leaving (or have left), no monks can be cured, and no monks can catch a new case of the disease.

Exploring the limits of how far logic can take you is fun (for some of us, anyway), so consider the case where a monk can catch a new case of blue-spot disease. Let day 0 be the day of the guru, and number the days sequentially from then for notational convenience. Assume that every monk sees every other monk at the end of every day, and that every monk knows that this happens. If, at the end of day N, a monk sees only N others with spots, that monk must leave (and all the others with spots will leave with him); otherwise, everyone stays. (A monk will never see fewer than N (other) spotty monks on day N, unless one or more gets healed.) This way, even if a new case occurs, so long as the spots appear by the end of the day, the system will still work.

Things become a lot more intricate if a monk can be healed. There are several distinct classes of problem; if a monk can heal spontaneously, or if the only way to get healed is in an infirmary (where perhaps records can be kept, even if it's just a tally of the number of monks who got cured that day), or if either can happen. The problem can be divided further on whether the disease is a once-in-a-lifetime type (like mumps) or not (like a cold). If spontaneous healing can occur, a solution like above probably cannot be found. If there is an infirmary where monks can heal, and it's a once-in-a-lifetime type, and the monks not only remember how many monks had spots but which ones had, there may be a way using the tally described, but there would probably have to be a special case for healing the last monk. I, for one, would like to read more if anyone has thought further on the problem.