Anaerobic digestion via biogas digesters is the most environmentally friendly solution to recycling degradable organic waste into organic fertilizer and energy. The organic fraction of municipal solid waste (OFMSW) is one of the main organic waste sources for biogas plants. The variations in characteristics of OFMSW as a main challenge lead to fluctuating organic loading rates and hydraulic retention time (HRT), which can adversely affect the performance of biogas plants. This study focused on the gaseous headspace of a biogas digester to assess a reliable monitoring method. An e-nose was applied to extract biogas patterns from a mesophilic digester, which operated at HRT of 30, 25, 20, and 15 days to treat OFMSW. The biogas samples were significantly classified based on their HRTs by the support vectors machine (SVM) and the random forest (RF). Finally, the results presented a promising method for monitoring the performance of the biogas digester.