With all due respect to the Obamites in this thread, you're right, there probably wasn't a warning that said "Be prepared! At xxxx time we think you will be attacked by individuals with guns and RPG's who intend to kill you." Those kind of messages generally don't show up outside of Hollywood.
However, it should have been pretty doggone clear to anyone with half a brain that after taking out al-Libi there was going to be some payback and that the payback was going to include death and mayhem. Under those circumstances our diplomatic corps folk can do any number of things. They can leave for safer territory. They can ask for more security from the US or they can ask for more security from the host nation. Our FSO's chose #3.
There are a lot of reasons to choose #3. Among those reasons is to show confidence in the host nation....to make them feel good about themselves and let them know that you feel good about them. Unfortunately, one of the problems with #3 is that quite often the security forces of the host nation are filled with people who don't necessarily have our best interests in mind. Intel services LOVE to go after embassy security because of the potential for tactical "insights".
Terrorists also have intel services and those operators function pretty much like the state sponsored ones except that in the case of bloodthirsty jihadi's they also usually have designs on blowing stuff up and killing lots of people. Those folks also generally don't give a rats rectum about how good we feel about them and as far as feeling better about themselves.......these are the people that feel better about themselves when they strap a vest full of Semtex and 16 penny nails to themselves and blow themselves up in a "glorious" explosion which takes out dozens of innocent bystanders.
The whole problem happened because the administration was pushing an agenda in the middle east based on visions of rainbows and dancing teddy bears instead of recognition of a growing movement to unify the entire area into the next caliphate.