A threat prediction method based on the mining of historical data in complex distributed systems is proposed. The relevance of the selected research topic is substantiated from the point of view of considering floods as a physical process of water rise, the level of which is measured at stationary hydrological posts. The mathematical formulation of the problem is formulated, within the framework of which an artificial neural network is implemented based on the free software library “TensorFlow”. An analysis of the effectiveness of the implemented artificial neural network was carried out, according to the results of which the weighted mean square-law deviation of the predicted water level value from the actual one when forecasting for one day at stationary hydrological posts was 0.032. Thus, the neural network allows predicting the flood situation with acceptable accuracy, which gives time for special services to carry out measures to counter this threat.