This idiom has come to mean something is either uproariously funny or ironically and sarcastically equally NOT funny at all.
Where did it come from?
Searching the etymology of this phrase proved a little challenging. It appears at best it’s simply a metaphor for cunning, mischievous, unrestrained hilarity someone coined and it stuck. You will find several conveyances for the rollicking monkeys, such as wagons, cages and boxes, but “barrel” is now the most common.
There is no way of knowing for sure how long “a barrel full of monkeys” has been around, but it did begin appearing in print in the 1800s.
The first appearance I can find quoted thanks to Ted Nesbit of en.allexperts.com is:
“De Traci chatters More than a cage of monkeys: we must wait.”
My brother..says the American girls are perfectly fascinating… He says they are more fun than a box of monkeys.