a nuisance, something that ditracts from getting things done. This is a variation on "a monkeywrench in the works" which dates back to the industrial revolution. If a wrench were to fall into the gears of the large factory machine, it would make everything stop.
monkey in the wrench was first used in the movie Die Hard in 1988. In the film, the hero is a cop trapped in a highrise building full of terrorists. After killing several of them, he talks to their leader via a cb radio. When the villain asks who he is, he states,
"Just a fly in the ointment Hans, a monkey in the wrench, a pain in the ass."