'Pull the data from the various hosts.'

def run(self):

    self.logger.info(('starting    log    data    collection:    ' + self.hostKey))
    sleepTime = self.mmsAgent.logCollectionInterval
    if (sleepTime < 1):
        sleepTime = 5
    logConn = None
    passes = 0
    while ((not self.mmsAgent.done) and self.running):
        try:
            enabled = self.mmsAgent.hostDefValue(self.hostKey, 'getLogs')
            if (not enabled):
                return
            passes = (passes + 1)
            if ((passes % 120) == 0):
                logConn = self.mmsAgent.closeDbConnection(self.hostKey, logConn)
            if (not logConn):
                logConn = self.mmsAgent.getDbConnection(self.hostKey)
            time.sleep(sleepTime)
            if (not self._processLogs(logConn)):
                logConn = self.mmsAgent.closeDbConnection(self.hostKey, logConn)
        except Exception as e:
            logConn = self.mmsAgent.closeDbConnection(self.hostKey, logConn)
            self.logger.error(((('Problem    collecting    log    data    from:    ' + self.hostKey) + '    -    exception:    ') + traceback.format_exc(e)))
    self.logger.info(('stopping    log    data    collection:    ' + self.hostKey))
    self.mmsAgent.closeDbConnection(self.hostKey, logConn)
