The stellarator Wendelstein 7-X (W7-X) uses electron cyclotron resonance heating (ECRH) by 140 GHz highpower microwave sources (gyrotrons) for plasma generation and as primary heating method. At the limit of operational stability, parasitic and satellite modes simultaneously excited to the working mode are converted to stray radiation in the gyrotron, resulting in a reduced efficiency and mostly in a mode loss. Hence the stray radiation level by these modes is proposed as an indicator for the operational stability. A feedback control system ensuring stable operation of the gyrotrons at highest possible output power and a fast mode recovery after a mode loss, is desirable for the ECRH on W7-X. Consequently shot spectrograms and the signal of a RF detector were examined to identify a reliable mode-loss-precursor in the stray radiation at the gyrotron relief window for the targeted control system. This information then can be used to derive and implement a control algorithm on a field programmable gate array (FPGA).