Canary birds served as an early warning system in the coal mines. The reason is that lethal gases take around 5 minutes to kill a canary bird, but around 12 minutes to kill a human being. That gives us some time to escape a lethal gas. 

The audible clue these birds provided were vital in the dark mines. If a canary bird went silent, it meant the obvious. Also, canary birds were used as messengers. If you were mining a century ago, Canary bird would have been in your tool set, that you carried everyday. Sounds strange!

Apart from these birds, there were other ways of detecting poisonous gases like methane. One such was to carry a special lantern. The flame turns its color in the presence of methane.