Onomatopoeia is defined as words that are used to imitate sounds they describe. There are two usages of onomatopoeia. One is fairly easy to recognize. It is easily illustrated by Batman's "Biff! Pow! Bam!" It is also illustrated in nursery rhyme language like "Baa, baa black sheep."
The other usage is more difficult to spot. According to Robert DiYanni writing for McGraw-Hill's Online Learning Center Glossary of Poetic Terms, the second usage of onomatopoeia is illustrated in Alexander Pope's poem "Sound and Sense": "When Ajax strives some rock's vast weight to throw, / The line too labors, and the words move slow."
By applying the characteristics of the second usage, an instance of onomatopoeia can be identified in "The Village Schoolmaster" by Oliver Goldsmith:
For e'en though vanquish'd he could argue still;
While words of learned length and thund'ring sound
Amazed the gazing rustics rang'd around;
The words the schoolmaster uses in his arguments are onomatopoetically described as having "learned length and thundering sound."
A simile is different from a metaphor in that a simile is a comparison of one noun with another noun that uses the word "like" or "as" or "as though" to trigger the comparison, for instance, the sound of running water was like a kitten's purr or a peach in summer is as a cool wind of taste or the meeting was as though by Fate. Each of these examples of simile has the word "like" or "as" or "as though" to trigger the comparison.
A metaphor differs from a simile in that it simply names one noun to be another noun, for instance, the roses are honey or the song is angel's words. Neither of these examples employs "like," "as" or "as though" after the verb be (are, is, were, was). Therefore, by these definitions, there are no similes in "The Village Schoolmaster" because there are no comparisons build with "like," "as," or "as though."
Metaphor, you recall, is a comparison of two nouns constructed without "like" etc., using only the verb be (are, is, were, was), for instance, love is lollipops. In "The Village Schoolmaster," the word is appears twice but it is functioning as a linking verb from a noun to an adjective. One sentence is inverted and in restored SVO order would read "All his fame is past (adjective)." The other is, "The very spot . . . is forgot[ten] (adjective)." Therefore, Goldsmith uses neither simile nor metaphor in "The Village Schoolmaster" because the verb is doesn't trigger a comparison of one noun to another noun.
[SVO order: Subject, Verb, Object]