We should take this as a warning to avoid making similar mistakes.
Tips
history
Inspired by 《国语·楚语下》: 人之求多闻善败,以鉴戒也 - people seek to know of successes and failures in order to take them as mirrors and warnings.
grammar
引以为 X is a classical pattern: 'take [it] as X'. See also 引以为荣 (take as pride), 引以为耻 (take as shame). The object taken as warning is usually introduced before the phrase.