In the framework of the thesis “Online Monitoring for Drinking Water Quality,” analysis of existing drinking water quality monitoring requirements and systems has been carried out, and a new online monitoring solution for drinking water quality have been developed. Existing water quality monitoring programmes are be based on “grab” sampling and analysis methods. They are not always capable of detecting pollution of water systems. Therefore, there are online drinking water monitoring systems with early warning function developing all over the world. Those systems automatically detect contamination events and triggers alarms in the event of deterioration of the quality of drinking water. However the contamination event detection precision by commercial early warning systems is rather low. Also there are only physically-chemical drinking water quality parameters analysed by those systems. It means that the microbiological compliance to safe water limits and the dynamics of quality is not evaluated. In this work, a solution for the online drinking water quality system is proposed. The proposed system includes measurements of physical-chemical and microbiological parameters and an automatic pollution detection and classification function that is provided with a custom Mahalanobis distance algorithm. The solution developed in the framework of the work has been experimentally tested in the pilot-wide water supply system, simulating various contamination event scenarios. During simulations, water quality monitoring of drinking water has been carried out and the water quality parameters and combinations of them that ensures the highest contamination event detection accuracy where selected. The best contamination event detection accuracy is ensured by the combination of adenosine triphosphate, turbidity, and total organic carbon measurements. During experiments, it was found that, by the implementation of drinking water quality monitoring principles in accordance with the existing legislation, simulated contamination events would not be detected. In real conditions, it would lead to consumption of unsafe drinking water. Theoretical and experimental results obtained within the work show the need to include online monitoring of microbiological parameters in early warning systems. The proposed solution includes potentially automated methods of testing of microbiological parameters for drinking water, which can significantly improve the accuracy of pollution detection. The time required for the assessment of the biological quality of drinking water for drinking water safety requirements would be reduced from the currently required 18 to 24 hours, to 5 minutes. The promotion work is written in Latvian and contains 120 pages, 18 images, 11 tables, 9 attachments and 186 literature sources were used to develop this work.