This phrase is believed to have originated with hotels, or more specifically, an "alarm clock" type service that hotels had, and still do. Read all about it here . When we use the phrase today we mean it as the original meaning and it also means an event or occurrence of some sort which alerts a person to a problem that needs fixing.