Sean Lamont grabbed a double, while Fraser Brown and former Zebre man Leonardo Sarto both crossed as Glasgow stretched out to a 30-11 lead.
Giovanbattista Venditti and Andries van Schalkwyk led the Zebre fightback with tries on their own before Clegg more or less wrapped things up and Townsend was happy despite the wobble.
"It was a loose game from both teams, we tried our best to look after the ball and defend well but we didn't do it consistently enough today," Townsend admitted.
"Zebre played well, they wanted to move the ball. It was far from perfect and far from our best performance but it was a bonus point win."
Glasgow kick off the European Rugby Champions cup on Friday at Scotstoun against Leicester Tigers and Townsend knows his side must improve if they are to prevail against Richard Cockerill's outfit.
The Warriors are yet to make it out of the group stage of the Champions Cup, but Townsend is hopeful that the 2014-15 Guinness PRO12 champions can turn their strong domestic form over the past couple of seasons into a winning European formula.
He said: "We've got two weeks now with a different focus and then it's Treviso at home after Europe. We've been preparing and will continue to prepare as well as we've ever done for this Leicester game.
"Simone Favaro was at the game today and Tim Swinson has had a week or two away so hopefully we can welcome them back and go into it with as strong a squad as possible."
Guinness PRO12 Final 2017 Ticket Information: Fans can save up to 20% on selected tickets, and prices start at just €30 adults and €5 child, and be booked via www.ticketmaster.ie. For further information visit http://www.pro12rugby.com/final