A method for detecting electric arcs on an X-ray generator, the method comprising recording mechanical vibrations of an environment of the X-ray generator, the X-ray generator, or elements of the X-ray generator, using at least one sensor configured to record vibrations to record vibrations, and processing signals recorded by the at least one sensor to identify peaks corresponding to the formation of the electric arcs.