Gas monitoring system has a gas alarm, controller and shutoff device. If the gas is leaked from the gas valve or gas pipe, the gas detector detects gas leaks and sends the signal to the controller. The controller exams the signal and then send to the shutoff device. Shutoff device operated to close the gas pipe to prevent the gas explosion.