From the USGS:
Today’s Earthquake Fact
The earliest reference to unusual animal behavior prior to a significant earthquake is from Greece in 373 BC. Rats, weasels, snakes, and centipedes reportedly left their homes and headed for safety several days before a destructive earthquake. Anecdotal evidence abounds of animals, fish, birds, reptiles, and insects exhibiting strange behavior anywhere from weeks to seconds before an earthquake. However, consistent and reliable behavior prior to seismic events, and a mechanism explaining how it could work, still eludes us.