def run(self):

        try:
            # run monitor on member_ip
            self.monitor.run(dst_ip=self.member_ip)
        except MonitorFailed as e:
            # if monitor failed status = False
            self.status = False
            self.status_reason =  str(e)
            self.status_time = time.time()
        
        # protect the app from crashing if a monitor crashes
        except Exception as e:
            # get traceback
            fo = io.StringIO()
            traceback.print_exception(*sys.exc_info(), limit=None, file=fo)
            self.status = False
            self.status_reason =  str(e)
            self.status_time = time.time()
            LOG.error('{} crashed, tb: {}'.format(str(self), fo.getvalue()))

        # monitor passed
        else:
            self.status = True
            self.status_reason = "monitor passed"

        # record time when the status was recorded
        self.status_time = time.time()
Run the monitor code
dataset/ETHPy150Open polaris-gslb/polaris-gslb/polaris_health/prober/probe.py/Probe.run