Gas detectors monitor hazardous combustible or toxic gases and trigger alarms when gas concentration exceeds safe limits.