Foundations of Real-Time Predictive Maintenance with Root Cause Analysis