There is a saying in Spanish that doesn't translate very well into English:
Cuando las barbas de tu vecino veas pelar, pon las tuyas a remojar.
When you see your neighbour's beard plucking[?], get yours to soak.
I've found a translation here that is wrong1.
The meaning of the Spanish saying is explained here (in Spanish). In English, it could be translated as:
If a misfortune strikes someone under circumstances similar to ours, then we should prepare ourselves for the same misfortune.
An equivalent saying in English is also proposed on the same page:
When thy neighbour's house is on fire, beware of thine own.
When the neighbour's house is on fire, beware of your own. (Mieder1992 p. 427)
When thy neighbour's house doth burn, then look to your own. (Apperson p. 407)
Look to thyself when the neighbour's house is on fire. (Fergusson n. 153.16 p. 236)
When the neighbour's house declines, beware the possibilities of your own. (Mieder1992 p. 427)
I find the above saying a bit too formal and I was wondering whether there is a more modern and not so formal way to express the equivalent meaning.
1 The reason why I consider this translation wrong is because "a mistake" is something we do ourselves; "a misfortune" is due to something out of our control.