The use of electronics and computer technology in production systems has greatly improved the quality of our industrial products. The productivity of these installations is a function of the maintenance quality applied to the equipment. Several methods are used to monitor the functioning of industrial installations. One of these methods is vibration analysis. The vibration signals from the rotating machines support several types of information related to the working state of the production tool. The processing of this information makes it possible to have decision tools for maintenance. In this work, we propose a method of anticipating the maintenance of rotating machines. The algorithm we propose starts with the removal of 512 point windows during the running time of the ball bearing. Each signal is decomposed by DWT: we obtain the approximation coefficients. These coefficients make it possible to determine the correlation coefficient between the so-called reference window and the other windows following the functioning of the ball bearing. The correlation coefficient is then the fundamental element of the decision. This algorithm has been applied to real vibration data and the results are encouraging.