a wakeup call

A wakeup call when referring to the non-literal sense (as opposed to a literal wakeup call when someone receives a call in place of an alarm clock) is defined as a sign or warning altering someone to the potential dangers and negative behaviors or circumstances of what they have or are about to do. Getting a wakeup call means finally understanding that what you have been doing is wrong due to the negative consequences.