Add support for identifying alerts by message.

Resolves #246.