The ionosphere is characterized by a large number of disturbances generated in response to a wide range of phenomena, including natural hazards, space weather and man-made events. Identification of the origin of ionospheric disturbances (ID), especially in real or near-real-time (NRT), is an extremely difficult task, and it is one of the most interesting fundamental scientific questions. In this paper we present, for the first time, an approach for an automatic and NRT-compatible detection and recognition of the source of ionospheric disturbances in time series of total electron content (TEC) measured by the Global Navigation Satellite Systems (GNSS) method. The main idea is (a) to analyze main characteristics (such as spatio-temporal features and frequency content) of ID generated by known sources, and (b) in NRT, to rapidly examine ID's features, and, based on this information, recognize their source. Currently, our database contains TEC data series with response to earthquakes, volcanic eruptions, tornadoes, explosions, rocket launches, equatorial plasma bubbles and geomagnetic storms. Our developments are important for the future assessment of natural hazards from the ionosphere, and also for NRT Space Weather nowcast and applications. Also, our work presents important information about the physical properties of ID of different origins.