Nearly every time I've come across that in industry the fault lamp is connected to the overload relay, if the motor pulls too much current the overload relay 'trips' disconnecting the supply to the coil of the motor contactor, the fault lamp is connected to the normally open contacts of the thermal relay so its on when a trip has occured.
Later control panels use a plc, a programmed controller, the fault indicator in this case is controlled by software.