The goal of this work is to build an effective and practical system to diagnose and prognose faults of complex systems, like aircraft, satellite and so on. In this paper, a machine-learning method Gaussian Mixture Models (GMMs) is used to automatically detect, isolate, and even forecast the faults, while keeping the reliability and safety of complex system. Each dysfunctional model is completed by GMMs during machine learning, which constitutes the diagnosis system to distinguish and troubleshooting the faults. On the other side, principal component analysis (PCA) is combined with the system to improve the efficiency of GMMs, which can effectively compress the high dimensional data. Except for that, GMMs helps the system to achieve the visualization of dysfunctional models. With this visualization, the prognosis system can surveil the evolution of data and estimate their tendency, which is important to forecast the next condition of the complex system. The diagnosis and prognosis system proposed in this paper has been fully tested by using actual experimental data of aircraft X, which is supplied by Dassault Aviation.