Efficient performance monitoring in production systems holds paramount importance as it enables organizations to optimize their manufacturing processes, enhance productivity, and maintain a competitive edge in the market. Typically, machine and system level performance monitoring systems are investigated independently, whereas an integrated approach that considers both levels can offer valuable insights and benefits. This paper introduces a data-driven approach for evaluating and improving the performance of production lines by monitoring the performance of both individual machines and their interactions as a system. The approach begins with a rigorous methodology for classifying machine states recorded by the Manufacturing Execution System (MES) into finer-grained substates, enabling a comprehensive analysis of machine cycle time variability. Subsequently, these substates are leveraged as a foundation for constructing performance monitoring models at both the machine and system levels, employing probabilistic automata for the machine level and logistic regression for the system level. The system-level performance monitoring model is constructed to predict a Flow metric that enables the prediction of abnormal behaviors and deviations from production targets. This data-driven approach serves as a foundational ingredient of a system-level digital twin, designed to provide production lines with insights that enable proactive implementation of measures aimed at optimizing overall manufacturing efficiency. Through an industrial test case from the automotive industry, the results demonstrate the capability of performance monitoring, capturing errors within confidence intervals, and establishing predictive cause-and-effect relationships between machines within the production system.