Inside the Neonatal Intensive Care Unit (NICU), exposure to loud sounds such as acoustic medical alarms can have adverse effects on neonates, parents, and medical staff. With the aim of having an accurate overview of which and how often acoustic medical alarms occur, this paper presents a simple signal processing-based approach for detecting and recognizing automatically and permanently patient monitoring alarms inside the NICU. The proposed algorithm leverages from prior knowledge of the spectro-temporal structures of alarms to first detect each single occurrence of an alarm tone, and then group the detected tones into a known alarm pattern. A preliminary evaluation of the algorithm on a small set of 4-channel recordings capturing a simulated NICU soundscape shows that around 99% of the acoustic alarms are correctly recognized, and that around 99% of the recognized alarms are true alarms. The algorithm lends itself to efficient real-time implementation and to generalization to other alarm patterns as defined by the IEC 60601-1-8 standard.