Shades of Green
Explorer
So, would level 2-3 suffice?Well, yeah, if the guards enjoyed all of those advantages and were not too badly outnumbered, that would very likely be true, though with their low attack bonuses and hit points it wouldn't be a foregone conclusion.
IMHO, the guards of a village or a small town should easily deal with goblinoid (or similar) harassment, and could probably repulse a typical "major" goblinoid attack with moderate losses, but they should need the help of the king's army and/or heroes (read: PCs) against repeated major goblinoid attacks, serious goblinoid harassment of outlaying farmsteads, and groups of higher-level monsters. They should probably also be able to keep a single ogre (or even troll, if they're prepared with a lot of fire gear/bombs/magic) at bay, but a gang of ogres or trolls would be able to extort a tribute from the typical village or small town, unless the king's men and/or the heroes show up and put the menace to the sword.
The king's men would include a few mounted knights (level 2-4 fighters for the very least, with full plate and at least masterwork weapons) and a large numbers of soldiers (level 1-4 warriors, with elite troops being level 1-3 fighters), as well as siege engines and a small number of clerics and wizards (though the siege engines, clerics and wizards are usually part of larger military forces, not small detachments and backwater garrisons). But the king's men couldn't be everywhere at once, especially if there is a war, revolt or border tension requiring the concentration of most of the army in one part of the kingdom.
Of course, the king (and the city watch of most large cities) would have a small handful of high-level (circa level 8-12) heroes for dealing with really serious threats, but these couldn't be everywhere at once, AND against real major threats (epic stuff, that is) you need REAL HEROES (read: high-level PCs).