We know that Erebor was not a hidden stronghold for several reasons:
It had the human town of Dale (itself an aboveground and completely obvious settlement) practically right outside its front door,
it was located inside literally the ONLY mountain anywhere around,
it was a major trafficker of all kinds of goods, and exported a good deal of luxury items,
and the side-door is always described with mentions of its great secrecy and camouflage . . . qualities that are NEVER applied to descriptions of the front gate.
As for DF fortresses, I've always found it silly that the goblins & megabeasts magically know not only how many dwarves your fort contains, but how much wealth they've accumulated. It would make far more sense to have invaders only concern themselves with your fort's exports, and regard your fort's population as completely irrelevant--except when calculating your militia's probable ability to repulse attacks. Even better would be for invaders to be attracted to WHAT you're exporting (and/or obviously gathering): Forts with a visibly thriving agricultural industry should be highly appealing to goblins, who are presumably astoundingly bad about growing enough food to feed their innumberable mouths. Bronze collosi, on the other hand, wouldn't care about food at all, but they might have a similar hunger to absorb metal and increase their mass even further, so your metal-bars stockpile might draw them literally like a magnet. Etc.