The paper proposes an online method to analyze the root cause of alarms arisen in industrial process variables. The relation among alarm variables is described by discrete Bayesian networks. A special network structure is considered, where only one child node exits so that its abnormal state is caused by one or multiple parent nodes. The root cause of alarms arisen in the child node is analyzed, by online learning the probabilities of network nodes. The proposed method can significantly alleviate negative effects of false or missed alarms in the nodes, and provides accurate root-cause analysis results subject to certain analysis delays. Numerical example is presented to illustrate the effectiveness of the proposed method.