An effective way of securing a probe inside an enclosure is using a zip tie. You can tie it down to a perch or on the wall.