Tumors in the abdomen and lungs often have respiration-induced motion and require precise tumor localization in real-time treatment delivery. In image-guided radiation therapy (IGRT), various internal and external surrogates have been introduced to derive tumor positions during treatment. Thus IGRT can potentially increase the treatment effectiveness for tumors in these locations. However, raw internal and external motion signals sometime have poor quality, such as missing values, random noise, spike noise, and irregular motion. To ensure a successive treatment with acquired signals, including the discovery of a reliable internal/external correlation, accurate tumor motion prediction, and precise radiation dose delivery, the quality of the raw motion data must be monitored and improved during real-time IGRT. We have designed and implemented an online preprocessing procedure to provide a trustworthy and clean data source for subsequent treatment steps.