A general approach to load and crack monitoring in planar mechanisms