Literally, the word alert means “on the watchtower.”
It came from an Italian military expression of the sixteenth century, all’ erta, in which all’ is a common contraction of alla, on.
The original phrase was stare all’ erta, “to stand on the watchtower.” As conditions changed, the phrase merely meant “to stand watch.”
Ultimately, with the omission of the verb, it came into English in the seventeenth century further contracted to alert, and with its meaning altered to signify “on watch; vigilant.”