Complex space systems such as lunar habitats generate huge amounts of data. For example, the International Space Station (ISS) has over 250,000 individually identified pieces of low-level telemetry and commands. Innovative algorithms for collecting and analyzing this data are leading to new technologies for managing large, complex and distributed systems. Lunar habitats will have multiple interacting subsystems that govern their behavior and performance. Assessing the health of the different subsystems and their effect on the overall system will be crucial to effective and safe control and operation of lunar habitats. There are three complementary approaches to diagnosis, prognosis, and recovery: 1) model-based approaches that rely on a priori models of the systems; 2) data-driven approaches that mine sensor and command data using machine learning and statistical methods; and 3) procedure-driven approaches that perform system tests and branch on the results until a root cause is found and a recovery strategy executed. We are proposing to build a comprehensive and integrated approach to fault diagnosis, prognosis and recovery that combines all three of these approaches emphasizing their strengths and negating their weaknesses. The resulting system will monitor spacecraft systems, detect and diagnose failures and respond to mitigate those failures.