Action that serves as a warning to others (6,6)
I believe the answer is:
object lesson
(Other definitions for object lesson that I've seen before include "punishment intended as a warning to others?" , "Instructive experience" , "What may be striking" , "Example typifying a principle" , "shows what one should do" .)