I'm reading this George MacDonald book, said to be an influence on Tolkien. It certainly does see reminiscent of the Hobbit and the Prologue, and maybe the Father Christmas Letters and my dim memories of the Lost Tales. But unlike some people (Tolkien), there's a note as to what the goblins live on:
The goats belonged to the miners mostly-a few of them to Curdie's mother; but there were a good many wild ones that seemed to belong to nobody. These the goblins counted theirs, and it was upon them partly that they lived. They set snares and dug pits for them; and did not scruple to take what tame ones happened to be caught; but they did not try to steal them in any other manner, because they were afraid of the dogs the hill-people kept to watch them, for the knowing dogs always tried to bite their feet. But the goblins had a kind of sheep of their own—very queer creatures, which they drove out to feed at night