The second quatrain of William Cowper's poem "The Solitude of Alexander Selkirk" is:
O Solitude! where are the charms
That sages have seen in thy face?
Better dwell in the midst of alarms,
Than reign in this horrible place.
This poem is well known for giving rise to the common English phrase "monarch of all I survey", but the lesser-known phrase "in the midst of alarms" has also inspired the titles of at least two other works: Robert Barr's novel and Dianne Graves's historical study.
Why was this particular phrase used? What about this choice of words appealed to the writer or made the poem more impactful? Specifically, the word "alarms" seems like a strange choice from a modern point of view: nowadays, it gives an impression of cacophonous noise (alarm clocks, car alarms, burglar alarms), but at the time of Cowper's writing, perhaps it was more commonly used, even as a count noun, in the sense of a feeling of danger. What exactly does "alarms" mean here, and why was this word chosen (apart from rhyme and metre) rather than something like "fear" or "danger" etc.?